MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / initialize

Method initialize

rb/lib/selenium/server.rb:136–155  ·  view source on GitHub ↗
(jar, opts = {})

Source from the content-addressed store, hash-verified

134 #
135
136 def initialize(jar, opts = {})
137 raise Errno::ENOENT, jar unless File.exist?(jar)
138
139 @java = opts.fetch(:java, 'java') || 'java'
140 @jar = jar
141 @host = '127.0.0.1'
142 @role = opts.fetch(:role, 'standalone')
143 @port = opts.fetch(:port, WebDriver::PortProber.above(4444))
144 @timeout = opts.fetch(:timeout, 30)
145 @background = opts.fetch(:background, false)
146 @additional_args = opts.fetch(:args, [])
147 @log = opts[:log]
148 if opts[:log_level]
149 @log ||= true
150 @additional_args << '--log-level'
151 @additional_args << opts[:log_level].to_s
152 end
153
154 @log_file = nil
155 end
156
157 def start
158 process.start

Callers

nothing calls this directly

Calls 3

fetchMethod · 0.80
to_sMethod · 0.80
aboveMethod · 0.45

Tested by

no test coverage detected