class Selenium::WebDriver::Remote::Http::Persistent
@api private
Public Class Methods
new(open_timeout: nil, read_timeout: nil)
click to toggle source
Calls superclass method
Selenium::WebDriver::Remote::Http::Default::new
# File lib/selenium/webdriver/remote/http/persistent.rb, line 28 def initialize(open_timeout: nil, read_timeout: nil) WebDriver.logger.deprecate("Selenium::WebDriver::Remote::Http::Persistent", id: :http_persistent) { "The default HTTP client now uses persistence." } super end
Public Instance Methods
close()
click to toggle source
# File lib/selenium/webdriver/remote/http/persistent.rb, line 34 def close @http&.shutdown end
Private Instance Methods
new_http_client()
click to toggle source
# File lib/selenium/webdriver/remote/http/persistent.rb, line 44 def new_http_client proxy = nil if @proxy unless @proxy.respond_to?(:http) url = @proxy.http raise Error::WebDriverError, "expected HTTP proxy, got #{@proxy.inspect}" unless url end proxy = URI.parse(url) end Net::HTTP::Persistent.new name: 'webdriver', proxy: proxy end
response_for(request)
click to toggle source
# File lib/selenium/webdriver/remote/http/persistent.rb, line 58 def response_for(request) http.request server_url, request end
start(*)
click to toggle source
# File lib/selenium/webdriver/remote/http/persistent.rb, line 40 def start(*) # no need to explicitly start connection end