lib/appium_lib/driver.rb in appium_lib-9.1.2 vs lib/appium_lib/driver.rb in appium_lib-9.1.3

- old
+ new

@@ -300,10 +300,13 @@ # instance of AbstractEventListener for logging support attr_accessor :listener # Returns the driver # @return [Driver] the driver attr_reader :driver + # Return http client called in start_driver() + # @return [Selenium::WebDriver::Remote::Http::Default] the http client + attr_reader :http_client # Creates a new driver # # ```ruby # require 'rubygems' @@ -545,16 +548,15 @@ # Creates a new global driver and quits the old one if it exists. # # @return [Selenium::WebDriver] the new global driver def start_driver - @client ||= Selenium::WebDriver::Remote::Http::Default.new - @client.timeout = 999_999 + @http_client ||= Selenium::WebDriver::Remote::Http::Default.new(open_timeout: 999_999, read_timeout: 999_999) begin driver_quit @driver = Selenium::WebDriver.for(:remote, - http_client: @client, + http_client: @http_client, desired_capabilities: @caps, url: server_url, listener: @listener) # Load touch methods.