Class | Selenium::Server |
In: |
lib/selenium/server.rb
|
Parent: | Object |
Wraps the remote server jar
Usage:
server = Selenium::Server.new('/path/to/selenium-server-standalone.jar') server.start
Automatically download the given version:
server = Selenium::Server.get '2.6.0' server.start
or the latest version:
server = Selenium::Server.get :latest server.start
Run the server in the background:
server = Selenium::Server.new(jar, :background => true) server.start
Add additional arguments:
server = Selenium::Server.new(jar) server << ["--additional", "args"] server.start
CL_RESET | = | WebDriver::Platform.windows? ? '' : "\r\e[0K" |
background | [RW] | Whether to launch the server in the background |
log | [RW] | Path to log file, or ‘true’ for stdout. |
port | [RW] | The server port |
timeout | [RW] | The server timeout |
@param [String] jar Path to the server jar. @param [Hash] opts the options to create the server process with
@option opts [Integer] :port Port the server should listen on (default: 4444). @option opts [Integer] :timeout Seconds to wait for server launch/shutdown (default: 30) @option opts [true,false] :background Run the server in the background (default: false) @option opts [true,false,String] :log Either a path to a log file,
or true to pass server log to stdout.
@raise [Errno::ENOENT] if the jar file does not exist