Created
April 15, 2011 19:20
-
-
Save mikegehard/922296 to your computer and use it in GitHub Desktop.
Setting longer HTTP timeout in capybara
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# We need this to fix the random timeout error that we were seeing in CI. | |
# May be related to: http://code.google.com/p/selenium/issues/detail?id=1439 | |
Capybara.register_driver :selenium_with_long_timeout do |app| | |
client = Selenium::WebDriver::Remote::Http::Default.new | |
client.timeout = 120 | |
Capybara::Driver::Selenium.new(app, :browser => :firefox, :http_client => client) | |
end | |
Capybara.javascript_driver = :selenium_with_long_timeout |
does this work the same with the capabilities syntax? where does read_timeout go now?
@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
Note that a recent capybara change requires
Capybara::Selenium::Driver
instead ofCapybara::Driver::Selenium