Note that there are some explanatory texts on larger screens.

plurals
  1. POSelenium doesn't work with Cucumber/Capybara (out of the box) - MacOSX
    primarykey
    data
    text
    <p>I'm having trouble trying to get a cucumber example to run under selenium. I'm running</p> <ul> <li>Rails3</li> <li>Cucumber 0.10.0</li> <li>Capybara 0.4.1.2</li> </ul> <p>Reading the doco on <a href="https://github.com/jnicklas/capybara" rel="nofollow">https://github.com/jnicklas/capybara</a>, it would appear that all that I need to get an example to run under selenium is to do the following:</p> <p>Step 1: Prefix the scenario with @javascript</p> <pre><code>@javascript Scenario: User does x ... </code></pre> <p>Step 2: Configure env.rb to tell capybara which driver to use:</p> <pre><code>Capybara.javascript_driver = :selenium </code></pre> <p>When I run:</p> <pre><code>bundle exec cucumber feature/myfeature.feature </code></pre> <p>I get the following:</p> <pre><code>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 </code></pre> <p>No firefox window. Nothing. It runs, hangs and dies.</p> <p>So to check whether capybara and the selenium webdriver is working, I wrote the following code:</p> <pre><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 </code></pre> <p>And ran it using:</p> <pre><code>bundle exec ruby /tmp/test.rb </code></pre> <p>That works. Firefox opens the window and navigates to www.stackoverflow.com.</p> <p>So how can I get diagnostic information to understand what cucumber is doing to capybara?</p> <p>I'm running OSX10., Ruby 1.8.7 and Firefox 3.6.13.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload