Error 'timed out (Capybara::TimeoutError)'

capybara, cucumber, ruby-on-rails

Solution

try putting @javascript and then run headless...hope it works...

You can try one more solution. I've removed this error by using google Chrome instead of Firefox and used curb protocol. First you have to get the chrome driver. I am not getting this error without removing fakeweb (that I thought, was the culprit)

 yum install curl
 yum install curl-devel
 gem install curb
 cd /usr/bin/chromedriver
 chmod +x /usr/bin/chromedriver

Include this in your `env.rb`

require 'selenium/webdriver/remote/http/curb'

Capybara.register_driver :selenium do |app|
  #http_client = Selenium::WebDriver::Remote::Http::Default.new
  #http_client.timeout = 100
  #Capybara::Selenium::Driver.new(app, :browser => :firefox, :http_client => http_client)

  http_client = Selenium::WebDriver::Remote::Http::Curb.new
  Capybara::Selenium::Driver.new(app, :browser => :chrome, :http_client => http_client)

end       

Hope it helps...

Problem

When I run my feature using tag `@firebug`, my test runs and passes without a hitch, but when I remove the tag `@firebug` and run test headless I get error `timed out (Capybara::TimeoutError)`. Unfortunately I can't provide much more information. I'm not really expecting an answer, but any help to point me in the right direction would be much appreciated.

Original source