Class: Selenium::WebDriver::Firefox::Service
- Inherits:
-
WebDriver::Service
- Object
- WebDriver::Service
- Selenium::WebDriver::Firefox::Service
- Defined in:
- rb/lib/selenium/webdriver/firefox/service.rb
Constant Summary collapse
- DEFAULT_PORT =
4444- EXECUTABLE =
'geckodriver'- SHUTDOWN_SUPPORTED =
false- DRIVER_PATH_ENV_KEY =
'SE_GECKODRIVER'
Instance Method Summary collapse
-
#initialize(args: nil) ⇒ Service
constructor
A new instance of Service.
- #launch ⇒ Object
Constructor Details
#initialize(args: nil) ⇒ Service
Returns a new instance of Service.
29 30 31 32 33 34 35 36 37 38 39 |
# File 'rb/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 'rb/lib/selenium/webdriver/firefox/service.rb', line 41 def launch configure_debug_args(args) if ENV.key?('SE_DEBUG') super end |