title: Cucumber tests fail randomly
body: <p>I have some Cucumber Scenario that are failing randomly both on local machine and Codeship (for Continuous Delivery). Running them individually or all together makes no difference, still pass and fail with no (identified) reason.</p>
  
  <p>In detail, looks like Capybara is unable to find an element on the page after the 'Continue to next page' is clicked. As suggested <a href="https://stackoverflow.com/questions/18693683/cucumber-capybara-tests-fail-randomly-under-phantomjs">here</a> I've updated the <code>default_wait_time</code> to 10 seconds and even tried to put some <code>sleep()</code> with no success.</p>
  
  <p>I've also seen that somebody had a similar situation (see <a href="https://stackoverflow.com/questions/15336218/how-to-debug-random-cucumber-failures">here</a>) and fixed updating the capybara-webkit. So I've updated cucumber, selenium and poltergeist gem (working in Ruby) but that didn't fix the problem either. </p>
  
  <p>It's worth mentioning that last time we pushed code in production <strong>these tests were passing correctly</strong>, both locally and on Codeship. No other release has been made after that so they started to fail while the code was already pushed in production. We explored some possible link with not-updated dates but looks like is all ok on that front.</p>
  
  <p>Any suggestion? Thanks in advance</p>
  
  <p>Environment: Ruby on Rails 2.0.0p598, Capybara 2.6.0, Cucumber 1.3.20, Cucumber-rails 1.4.2, poltergeist 1.8.1, selenium-webdriver 2.49</p>
  
  <p>__</p>
  
  <p>EXAMPLES OF CODE FAILING:</p>
  
  <pre><code>@vcr_cassette #to fake API call
  Scenario: User should be able to complete the last step of the application
    When I complete the application up to step 5 
    Then I should read "Step 6" #FAILS HERE
    When I fill application step 6
    And I click on "Submit your application"
    Then I should read "Congratulations! You have finished your application."
  
  @vcr_cassette #to fake API call
  Scenario: User should be able to complete the application
     When I complete the application up to step 6 #FAILS HERE
     Then I should read "Congratulations! You have finished your application."
  </code></pre>
  
  <p>Capybara fails to read 'Step 6' </p>