Sha256: 66d477bd2c1d331a65b6d9253c1fdbb8010eb65cf46e39b829132addff23c138

Contents?: true

Size: 980 Bytes

Versions: 3

Compression:

Stored size: 980 Bytes

Contents

module Selenium
  module WebDriver
    module Android
      class Bridge < Remote::Bridge

        DEFAULT_URL = "http://localhost:8080/hub"

        def initialize(opts = nil)
          if opts
            super
          else
            super(
              :url                  => DEFAULT_URL,
              :desired_capabilities => capabilities
            )
          end
        end

        def browser
          :android
        end

        def driver_extensions
          [
            DriverExtensions::TakesScreenshot,
            DriverExtensions::Rotatable
          ]
        end

        def setScreenOrientation(orientation)
          execute :setScreenOrientation, {}, :orientation => orientation
        end

        def getScreenOrientation
          execute :getScreenOrientation
        end

        def capabilities
          @capabilities ||= Remote::Capabilities.android
        end

      end # Bridge
    end # Android
  end # WebDriver
end # Selenium

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
selenium-webdriver-0.1.2 lib/selenium/webdriver/android/bridge.rb
selenium-webdriver-0.1.1 lib/selenium/webdriver/android/bridge.rb
selenium-webdriver-0.1.0 lib/selenium/webdriver/android/bridge.rb