Class: Selenium::WebDriver::Safari::Driver Private

Inherits:
Driver
  • Object
show all
Includes:
DriverExtensions::HasDebugger, DriverExtensions::HasPermissions, DriverExtensions::TakesScreenshot
Defined in:
lib/selenium/webdriver/safari/driver.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Driver implementation for Safari.

Constant Summary

Constants included from Selenium::WebDriver::SearchContext

Selenium::WebDriver::SearchContext::FINDERS

Instance Method Summary collapse

Methods included from DriverExtensions::TakesScreenshot

#save_screenshot, #screenshot_as

Methods included from DriverExtensions::HasPermissions

#permissions, #permissions=

Methods included from DriverExtensions::HasDebugger

#attach_debugger

Methods inherited from Driver

#[], #action, #capabilities, #close, #current_url, #execute_async_script, #execute_script, for, #get, #inspect, #keyboard, #manage, #mouse, #navigate, #page_source, #ref, #switch_to, #title, #window_handle, #window_handles

Methods included from Selenium::WebDriver::SearchContext

#find_element, #find_elements

Constructor Details

#initialize(opts = {}) ⇒ Driver

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Driver.


34
35
36
37
38
39
40
41
42
43
44
# File 'lib/selenium/webdriver/safari/driver.rb', line 34

def initialize(opts = {})
  opts[:desired_capabilities] = create_capabilities(opts)

  opts[:url] ||= service_url(opts)

  listener = opts.delete(:listener)
  @bridge = Remote::Bridge.handshake(**opts)
  @bridge.extend Bridge

  super(@bridge, listener: listener)
end

Instance Method Details

#browserObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


46
47
48
# File 'lib/selenium/webdriver/safari/driver.rb', line 46

def browser
  :safari
end

#quitObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


50
51
52
53
54
# File 'lib/selenium/webdriver/safari/driver.rb', line 50

def quit
  super
ensure
  @service&.stop
end