Method: Selenium::Server#initialize

Defined in:
lib/selenium/server.rb

#initialize(jar, opts = {}) ⇒ Server

Returns a new instance of Server.

Raises:

  • (Errno::ENOENT)

13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/selenium/server.rb', line 13

def initialize(jar, opts = {})
  raise Errno::ENOENT, jar unless File.exist?(jar)

  @jar        = jar
  @host       = "127.0.0.1"
  @port       = opts.fetch(:port, 4444)
  @timeout    = opts.fetch(:timeout, 30)
  @background = opts.fetch(:background, false)
  @log        = opts[:log]

  @additional_args = []
end