Sha256: 73248a5259a0c4248ffe0f2881f6e4c8963b5debb7eabb514d3521e5c49aec04

Contents?: true

Size: 607 Bytes

Versions: 20

Compression:

Stored size: 607 Bytes

Contents

module Webdriver
  class Client
    def initialize(endpoint, desired_capabilities={})
      uri = URI(endpoint)
      @connection = Webdriver::Connection.new endpoint
      @desired_capabilities = desired_capabilities
    end

    def status
      @connection.get "status"
    end

    def sessions
      value = @connection.get "sessions"
      value.map { |json| Webdriver::Session.new json, @connection }
    end

    def session!
      json = @connection.post "session", {}, {
        desiredCapabilities: @desired_capabilities
      }

      Webdriver::Session.new json, @connection
    end

  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
webdriver-0.16.0 lib/webdriver/client.rb
webdriver-0.15.0 lib/webdriver/client.rb
webdriver-0.14.0 lib/webdriver/client.rb
webdriver-0.13.0 lib/webdriver/client.rb
webdriver-0.12.0 lib/webdriver/client.rb
webdriver-0.11.1 lib/webdriver/client.rb
webdriver-0.11.0 lib/webdriver/client.rb
webdriver-0.10.0 lib/webdriver/client.rb
webdriver-0.9.1 lib/webdriver/client.rb
webdriver-0.9.0 lib/webdriver/client.rb
webdriver-0.8.0 lib/webdriver/client.rb
webdriver-0.7.0 lib/webdriver/client.rb
webdriver-0.6.4 lib/webdriver/client.rb
webdriver-0.6.3 lib/webdriver/client.rb
webdriver-0.6.2 lib/webdriver/client.rb
webdriver-0.6.0 lib/webdriver/client.rb
webdriver-0.5.0 lib/webdriver/client.rb
webdriver-0.4.0 lib/webdriver/client.rb
webdriver-0.3.0 lib/webdriver/client.rb
webdriver-0.2.0 lib/webdriver/client.rb