开发者

Cucumber, Webrat and Selenium NoMethodError in Rails 3

开发者 https://www.devze.com 2023-02-13 17:52 出处:网络
I\'m having a problem using selenium. When I have a scenario which uses the \"I should see foo within bar\" web step from cucumber, I get the following error:

I'm having a problem using selenium. When I have a scenario which uses the "I should see foo within bar" web step from cucumber, I get the following error:

NoMethodError: undefined method `within' for #<Webrat::SeleniumSession:0x000000057ea608>

It works fine just using cucumber and webrat without selenium.

Here is the webrat configure block from my env.rb:

Webrat.configure do |config|
  config.mode = :selenium
  config.application_framework = :rack
  config.open_error_files = false开发者_运维问答 # Set to true if you want error pages to pop up in the browser
end

Here is the step that causes the trouble (it's implementation is in web_steps.rb)

Then I should not see "2" within "#node"


Could you post your step? The definition for this is in web_steps.rb

Are you sure your step matches the regexp in this file? AFAIK there should be double quotes around the "foo" and "bar"

0

精彩评论

暂无评论...
验证码 换一张
取 消