Class: Async::WebDriver::Bridge::Firefox::Driver
- Defined in:
- lib/async/webdriver/bridge/firefox.rb
Overview
A locally managed ‘geckodriver` process.
Instance Attribute Summary
Attributes inherited from Driver
Instance Method Summary collapse
- #arguments(**options) ⇒ Object
-
#close ⇒ Object
Stop the managed Firefox driver process.
- #concurrency ⇒ Object
-
#initialize(**options) ⇒ Driver
constructor
Initialize a managed Firefox driver process.
-
#start ⇒ Object
Start the managed Firefox driver process and wait for readiness.
Methods inherited from Driver
#The status of the driver after a connection has been established.=, #client, #closed?, #endpoint, #ephemeral_port, #port, #reusable?, #viable?
Constructor Details
#initialize(**options) ⇒ Driver
Initialize a managed Firefox driver process.
40 41 42 43 |
# File 'lib/async/webdriver/bridge/firefox.rb', line 40 def initialize(**) super(**) @process_group = nil end |
Instance Method Details
#arguments(**options) ⇒ Object
51 52 53 54 55 56 |
# File 'lib/async/webdriver/bridge/firefox.rb', line 51 def arguments(**) [ .fetch(:path, "geckodriver"), "--port", self.port.to_s, ].compact end |
#close ⇒ Object
Stop the managed Firefox driver process.
66 67 68 69 70 71 72 73 |
# File 'lib/async/webdriver/bridge/firefox.rb', line 66 def close if @process_group @process_group.close @process_group = nil end super end |
#concurrency ⇒ Object
46 47 48 |
# File 'lib/async/webdriver/bridge/firefox.rb', line 46 def concurrency 1 end |
#start ⇒ Object
Start the managed Firefox driver process and wait for readiness.
59 60 61 62 63 |
# File 'lib/async/webdriver/bridge/firefox.rb', line 59 def start @process_group = ProcessGroup.spawn(*arguments(**@options)) super end |