Class: Selenium::WebDriver::Chrome::Driver Private
- Includes:
- DriverExtensions::DownloadsFiles, DriverExtensions::HasLocation, DriverExtensions::HasNetworkConditions, DriverExtensions::HasTouchScreen, DriverExtensions::HasWebStorage, DriverExtensions::TakesScreenshot
- Defined in:
- lib/selenium/webdriver/chrome/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 Chrome.
Constant Summary
Constants included from SearchContext
Instance Method Summary collapse
- #browser ⇒ Object private
- #execute_cdp(cmd, **params) ⇒ Object private
-
#initialize(opts = {}) ⇒ Driver
constructor
private
A new instance of Driver.
- #quit ⇒ Object private
Methods included from DriverExtensions::DownloadsFiles
Methods included from DriverExtensions::TakesScreenshot
#save_screenshot, #screenshot_as
Methods included from DriverExtensions::HasLocation
#location, #location=, #set_location
Methods included from DriverExtensions::HasWebStorage
#local_storage, #session_storage
Methods included from DriverExtensions::HasTouchScreen
Methods included from DriverExtensions::HasNetworkConditions
#network_conditions, #network_conditions=
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 SearchContext
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.
37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/selenium/webdriver/chrome/driver.rb', line 37 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
#browser ⇒ Object
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.
49 50 51 |
# File 'lib/selenium/webdriver/chrome/driver.rb', line 49 def browser :chrome end |
#execute_cdp(cmd, **params) ⇒ Object
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.
59 60 61 |
# File 'lib/selenium/webdriver/chrome/driver.rb', line 59 def execute_cdp(cmd, **params) @bridge.send_command(cmd: cmd, params: params) end |
#quit ⇒ Object
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.
53 54 55 56 57 |
# File 'lib/selenium/webdriver/chrome/driver.rb', line 53 def quit super ensure @service&.stop end |