Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Setting longer HTTP timeout in capybara
# We need this to fix the random timeout error that we were seeing in CI.
# May be related to:
Capybara.register_driver :selenium_with_long_timeout do |app|
client =
client.timeout = 120, :browser => :firefox, :http_client => client)
Capybara.javascript_driver = :selenium_with_long_timeout
Copy link

Thanks for sharing this. Just came across this when I did a Google search on how to change seleniums default timout.

Copy link

woto commented May 22, 2013

Same reason here.
Not sure, but also

Capybara.default_wait_time = 10

Copy link

Nuru commented Sep 6, 2013

Using Capybara 1.0.0 or later, it is Capybara::Selenium::Driver not Capybara::Driver::Selenium.

See release notes ("Changed") for 1.0.0 at

Also, Capybara.default_wait_time is how long Capybara waits for AJAX calls to modify the DOM when testing conditions and has nothing to do with Timeouts.

Copy link

Note that a recent capybara change requires Capybara::Selenium::Driver instead of Capybara::Driver::Selenium

Copy link

does this work the same with the capabilities syntax? where does read_timeout go now?

Copy link

@epipheus I'm not sure. I've moved out of the Ruby ecosystem so can't confirm where it goes now. Sorry...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment