Class: Async::WebDriver::Bridge::Safari::Driver
- Defined in:
- lib/async/webdriver/bridge/safari.rb
Overview
A locally managed ‘safaridriver` process.
Instance Attribute Summary
Attributes inherited from Driver
Instance Method Summary collapse
- #arguments(**options) ⇒ Object
-
#close ⇒ Object
Stop the managed Safari driver process.
-
#initialize(**options) ⇒ Driver
constructor
Initialize a managed Safari driver process.
-
#start ⇒ Object
Start the managed Safari driver process and wait for readiness.
Methods inherited from Driver
#The status of the driver after a connection has been established.=, #client, #closed?, #concurrency, #endpoint, #ephemeral_port, #port, #reusable?, #viable?
Constructor Details
#initialize(**options) ⇒ Driver
Initialize a managed Safari driver process.
41 42 43 44 |
# File 'lib/async/webdriver/bridge/safari.rb', line 41 def initialize(**) super(**) @process_group = nil end |
Instance Method Details
#arguments(**options) ⇒ Object
47 48 49 50 51 52 |
# File 'lib/async/webdriver/bridge/safari.rb', line 47 def arguments(**) [ .fetch(:driver_path, "safaridriver"), "--port=#{self.port}", ].compact end |
#close ⇒ Object
Stop the managed Safari driver process.
62 63 64 65 66 67 68 69 |
# File 'lib/async/webdriver/bridge/safari.rb', line 62 def close if @process_group @process_group.close @process_group = nil end super end |
#start ⇒ Object
Start the managed Safari driver process and wait for readiness.
55 56 57 58 59 |
# File 'lib/async/webdriver/bridge/safari.rb', line 55 def start @process_group = ProcessGroup.spawn(*arguments(**@options)) super end |