Method: Selenium::Client::Base#start_new_browser_session

Defined in:
lib/selenium/client/base.rb

#start_new_browser_session(options = {}) ⇒ Object

Starts a new browser session (launching a new browser matching configuration provided at driver creation time).

Browser session specific option can also be provided. e.g.

driver.start_new_browser_session(:captureNetworkTraffic => true)

83
84
85
86
87
88
89
90
91
# File 'lib/selenium/client/base.rb', line 83

def start_new_browser_session(options={})
  options_as_string = options.collect {|key,value| "#{key.to_s}=#{value.to_s}"}.sort.join(";")
  result = string_command "getNewBrowserSession", [@browser_string, @browser_url, @extension_js, options_as_string]
  @session_id = result
  # Consistent timeout on the remote control and driver side.
  # Intuitive and this is what you want 90% of the time
  self.remote_control_timeout_in_seconds = @default_timeout_in_seconds         
  self.highlight_located_element = true if highlight_located_element_by_default
end