Sha256: b0467b2fbbfb34383ffb4c276642782ca3359d3e08ba8f3996d5c1db1f653123

Contents?: true

Size: 763 Bytes

Versions: 11

Compression:

Stored size: 763 Bytes

Contents

module Selenium
  module Rake
  
    class RemoteControlStopTask
      attr_accessor :host, :port, :timeout_in_seconds

      def initialize(name = :'selenium:rc:stop')
        @host = "localhost"
        @name = name
        @port = 4444
        @timeout_in_seconds = 5
        yield self if block_given?
        define
      end
    
      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

    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
selenium-client-1.2.3 lib/selenium/rake/remote_control_stop_task.rb
selenium-client-1.2.4 lib/selenium/rake/remote_control_stop_task.rb
selenium-client-1.2.9 lib/selenium/rake/remote_control_stop_task.rb
selenium-client-1.2 lib/selenium/rake/remote_control_stop_task.rb
selenium-client-1.2.10 lib/selenium/rake/remote_control_stop_task.rb
selenium-client-1.2.2 lib/selenium/rake/remote_control_stop_task.rb
selenium-client-1.2.7 lib/selenium/rake/remote_control_stop_task.rb
selenium-client-1.2.1 lib/selenium/rake/remote_control_stop_task.rb
selenium-client-1.2.6 lib/selenium/rake/remote_control_stop_task.rb
selenium-client-1.2.5 lib/selenium/rake/remote_control_stop_task.rb
selenium-client-1.2.8 lib/selenium/rake/remote_control_stop_task.rb