I'm having trouble trying to get a cucumber example to run under selenium. I'm running
- Rails3
- Cucumber 0.10.0
- Capybara 0.4.1.2
Reading the doco on https://github.com/jnicklas/capybara, it would appear that all that I need to get an example to run under selenium is to do the following:
Step 1: Prefix the scenario with @javascript
@javascript
Scenario: User does x
...
Step 2: Configure env.rb to tell capybara which driver to use:
Capybara.javascript_driver = :selenium
When I run:
bundle exec cucumber feature/myfeature.feature
I get the following:
Using the default profile...
F------------F
Failing Scenarios:
cucumber features/myfeature.feature:7 # Scenario: User does x
1 scenario (1 failed)
12 steps (12 skipped)
0m0.012s
No firefox window. Nothing. It runs, hangs and dies.
So to check whether capybara and the selenium webdriver is working, I wrote the following code:
require 'capybara'
require 'capybara/dsl'
Capybara.default_driver = :selenium
class Test
include Capybara
def dotest
visit('http://www.stackoverflow.com')
end
end
Test.new.dotest
And ran it using:
bundle exec ruby /tmp/test.rb
That works. Firefox opens the window and navigates to www.stackoverflow.com.
So how can I get diagnostic information to understand what cucumber is doing to capybara?
I'm running OSX10., Ruby 1.8.7 and Firefox 3.6.13.