Cucumber, Webrat and Selenium NoMethodError in Rails 3
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"
精彩评论