Class: Async::WebDriver::Bridge::Firefox::Driver
- Inherits:
-
Driver
- Object
- Driver
- Async::WebDriver::Bridge::Firefox::Driver
show all
- Defined in:
- lib/async/webdriver/bridge/firefox.rb
Instance Attribute Summary
Attributes inherited from Driver
#count, #status
Instance Method Summary
collapse
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
Returns a new instance of Driver.
36
37
38
39
|
# File 'lib/async/webdriver/bridge/firefox.rb', line 36
def initialize(**options)
super(**options)
@process_group = nil
end
|
Instance Method Details
#arguments(**options) ⇒ Object
46
47
48
49
50
51
|
# File 'lib/async/webdriver/bridge/firefox.rb', line 46
def arguments(**options)
[
options.fetch(:path, "geckodriver"),
"--port", self.port.to_s,
].compact
end
|
#close ⇒ Object
59
60
61
62
63
64
65
66
|
# File 'lib/async/webdriver/bridge/firefox.rb', line 59
def close
if @process_group
@process_group.close
@process_group = nil
end
super
end
|
#concurrency ⇒ Object
41
42
43
|
# File 'lib/async/webdriver/bridge/firefox.rb', line 41
def concurrency
1
end
|
#start ⇒ Object
53
54
55
56
57
|
# File 'lib/async/webdriver/bridge/firefox.rb', line 53
def start
@process_group = ProcessGroup.spawn(*arguments(**@options))
super
end
|