Skip to content

Instantly share code, notes, and snippets.

@jarib
Created January 10, 2014 15:14
Show Gist options
  • Save jarib/8356092 to your computer and use it in GitHub Desktop.
Save jarib/8356092 to your computer and use it in GitHub Desktop.
client = Selenium::WebDriver::Remote::Http::Persistent.new
#
# hack - TODO: fix ability to override open timeout in selenium-webdriver
#
client.extend(Module.new do
attr_accessor :open_timeout, :read_timeout
def http
@http ||= (
http = new_http_client
http.open_timeout = @open_timeout if @open_timeout
http.read_timeout = @read_timeout if @read_timeout
http
)
end
end)
client.open_timeout = @http_open_timeout
client.read_timeout = @http_timeout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment