Class Selenium::RemoteControl::RemoteControl
In: lib/selenium/remote_control/remote_control.rb
Parent: Object

Methods

new   start   stop  

Attributes

additional_args  [RW] 
host  [R] 
jar_file  [RW] 
log_to  [RW] 
port  [R] 
timeout_in_seconds  [R] 

Public Class methods

[Source]

    # File lib/selenium/remote_control/remote_control.rb, line 8
 8:       def initialize(host, port, timeout_in_seconds = 2 * 60)
 9:         @host, @port, @timeout_in_seconds = host, port, timeout_in_seconds
10:         @additional_args = []
11:         @shell = Nautilus::Shell.new
12:       end

Public Instance methods

[Source]

    # File lib/selenium/remote_control/remote_control.rb, line 14
14:       def start(options = {})
15:         command = "java -jar \"#{jar_file}\""
16:         command << " -port #{@port}"
17:         command << " -timeout #{@timeout_in_seconds}"
18:         command << " #{additional_args.join(' ')}" unless additional_args.empty?
19:         command << " > #{log_to}" if log_to
20:         
21:         @shell.run command, {:background => options[:background]}
22:       end

[Source]

    # File lib/selenium/remote_control/remote_control.rb, line 24
24:       def stop
25:         Net::HTTP.get(@host, '/selenium-server/driver/?cmd=shutDownSeleniumServer', @port)
26:       end

[Validate]