Method: Selenium::WebDriver::Service#initialize
- Defined in:
- lib/selenium/webdriver/common/service.rb
#initialize(executable_path, port, driver_opts) ⇒ Service
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Service.
48 49 50 51 52 53 54 55 |
# File 'lib/selenium/webdriver/common/service.rb', line 48 def initialize(executable_path, port, driver_opts) @executable_path = binary_path(executable_path) @host = Platform.localhost @port = Integer(port) @extra_args = extract_service_args(driver_opts) raise Error::WebDriverError, "invalid port: #{@port}" if @port < 1 end |