Class | Selenium::Rake::RemoteControlStartTask |
In: |
lib/selenium/rake/remote_control_start_task.rb
|
Parent: | Object |
additional_args | [RW] | |
background | [RW] | |
jar_file | [R] | |
port | [RW] | |
timeout_in_seconds | [RW] | |
wait_until_up_and_running | [RW] |
# File lib/selenium/rake/remote_control_start_task.rb, line 9 9: def initialize(name = 'selenium:rc:start''selenium:rc:start') 10: @name = name 11: @port = 4444 12: @timeout_in_seconds = 5 13: @jar_file = "vendor/selenium/selenium-server-1.0-standalone.jar" 14: @additional_args = [] 15: @background = false 16: @wait_until_up_and_running = false 17: yield self if block_given? 18: define 19: end
# File lib/selenium/rake/remote_control_start_task.rb, line 25 25: def define 26: desc "Launch Selenium Remote Control" 27: task @name do 28: puts "Starting Selenium Remote Control at 0.0.0.0:#{@port}..." 29: remote_control = Selenium::RemoteControl::RemoteControl.new("0.0.0.0", @port, @timeout_in_seconds) 30: remote_control.jar_file = @jar_file 31: remote_control.additional_args = @additional_args 32: remote_control.start :background => @background 33: if @background && @wait_until_up_and_running 34: puts "Waiting for Remote Control to be up and running..." 35: TCPSocket.wait_for_service :host => @host, :port => @port 36: end 37: puts "Selenium Remote Control at 0.0.0.0:#{@port} ready" 38: end 39: end