Class: Selenium::Rake::RemoteControlStopTask
- Inherits:
-
Object
- Object
- Selenium::Rake::RemoteControlStopTask
- Defined in:
- lib/selenium/rake/remote_control_stop_task.rb
Instance Attribute Summary collapse
-
#host ⇒ Object
Returns the value of attribute host.
-
#port ⇒ Object
Returns the value of attribute port.
-
#timeout_in_seconds ⇒ Object
Returns the value of attribute timeout_in_seconds.
Instance Method Summary collapse
- #define ⇒ Object
-
#initialize(name = :'selenium:rc:stop') {|_self| ... } ⇒ RemoteControlStopTask
constructor
A new instance of RemoteControlStopTask.
Constructor Details
#initialize(name = :'selenium:rc:stop') {|_self| ... } ⇒ RemoteControlStopTask
Returns a new instance of RemoteControlStopTask.
7 8 9 10 11 12 13 14 |
# File 'lib/selenium/rake/remote_control_stop_task.rb', line 7 def initialize(name = :'selenium:rc:stop') @host = "localhost" @name = name @port = 4444 @timeout_in_seconds = 5 yield self if block_given? define end |
Instance Attribute Details
#host ⇒ Object
Returns the value of attribute host.
5 6 7 |
# File 'lib/selenium/rake/remote_control_stop_task.rb', line 5 def host @host end |
#port ⇒ Object
Returns the value of attribute port.
5 6 7 |
# File 'lib/selenium/rake/remote_control_stop_task.rb', line 5 def port @port end |
#timeout_in_seconds ⇒ Object
Returns the value of attribute timeout_in_seconds.
5 6 7 |
# File 'lib/selenium/rake/remote_control_stop_task.rb', line 5 def timeout_in_seconds @timeout_in_seconds end |
Instance Method Details
#define ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/selenium/rake/remote_control_stop_task.rb', line 16 def define desc "Stop Selenium Remote Control running" task @name do puts "Stopping Selenium Remote Control running at #{@host}:#{@port}..." remote_control = Selenium::RemoteControl::RemoteControl.new(@host, @port, @timeout_in_seconds) remote_control.stop puts "Stopped Selenium Remote Control running at #{@host}:#{@port}" end end |