質問

I am writing tests using selenium webdriver with cucumber. The web page is very much ajax-based. What I want to do is, whenever cucumber calls a method, it should call someother method ALWAYS.

So say in my feature file I have:

When I say hello

which calls method

sayHello()

after this I want

waitForAjax()

to be called.

How can I do this?

役に立ちましたか?

解決

If you want to invoke that method after each Cucumber step, you can use AfterStep hook:

AfterStep do |scenario|
  # Do something after each step.
end
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top