Class: Selenium::WebDriver::Firefox::Service
- Defined in:
- lib/selenium/webdriver/firefox/service.rb
Constant Summary collapse
- DEFAULT_PORT =
4444- EXECUTABLE =
'geckodriver'- SHUTDOWN_SUPPORTED =
false- DRIVER_PATH_ENV_KEY =
'SE_GECKODRIVER'
Instance Attribute Summary
Attributes inherited from Service
#args, #executable_path, #host, #log, #port
Instance Method Summary collapse
-
#initialize(args: nil) ⇒ Service
constructor
A new instance of Service.
- #launch ⇒ Object
Methods inherited from Service
chrome, edge, firefox, ie, safari, #shutdown_supported
Constructor Details
#initialize(args: nil) ⇒ Service
Returns a new instance of Service.
29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/selenium/webdriver/firefox/service.rb', line 29 def initialize(args: nil, **) args = Array(args.dup) unless args.any? { |arg| arg.include?('--connect-existing') || arg.include?('--websocket-port') } args << '--websocket-port' args << '0' end configure_debug_args(args) if ENV.key?('SE_DEBUG') super end |
Instance Method Details
#launch ⇒ Object
41 42 43 44 45 |
# File 'lib/selenium/webdriver/firefox/service.rb', line 41 def launch configure_debug_args(args) if ENV.key?('SE_DEBUG') super end |