class Selenium::WebDriver::Service

def initialize(path: nil, port: nil, log: nil, args: nil)

def initialize(path: nil, port: nil, log: nil, args: nil)
  port ||= self.class::DEFAULT_PORT
  args ||= []
  @executable_path = path
  @host = Platform.localhost
  @port = Integer(port)
  @log = case log
         when :stdout
           $stdout
         when :stderr
           $stderr
         else
           log
         end
  @args = args
  raise Error::WebDriverError, "invalid port: #{@port}" if @port < 1
end