Class: Selenium::WebDriver::Android::Bridge Private

Inherits:
Remote::Bridge show all
Defined in:
lib/selenium/webdriver/android/bridge.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Constant Summary collapse

DEFAULT_URL =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

"http://#{Platform.localhost}:8080/wd/hub/"

Constants inherited from Remote::Bridge

Remote::Bridge::QUIT_ERRORS

Instance Attribute Summary

Attributes inherited from Remote::Bridge

#context, #file_detector, #http

Instance Method Summary collapse

Methods inherited from Remote::Bridge

#acceptAlert, #addCookie, #clearElement, #clearLocalStorage, #clearSessionStorage, #click, #clickElement, #close, command, #contextClick, #create_session, #deleteAllCookies, #deleteCookie, #dismissAlert, #doubleClick, #dragElement, #elementEquals, #executeAsyncScript, #executeScript, #find_element_by, #find_elements_by, #get, #getActiveElement, #getAlert, #getAlertText, #getAllCookies, #getAvailableLogTypes, #getCapabilities, #getCurrentUrl, #getCurrentWindowHandle, #getElementAttribute, #getElementLocation, #getElementLocationOnceScrolledIntoView, #getElementSize, #getElementTagName, #getElementText, #getElementValue, #getElementValueOfCssProperty, #getLocalStorageItem, #getLocalStorageKeys, #getLocalStorageSize, #getLocation, #getLog, #getNetworkConnection, #getPageSource, #getScreenOrientation, #getScreenshot, #getSessionStorageItem, #getSessionStorageKeys, #getSessionStorageSize, #getTitle, #getVisible, #getWindowHandles, #getWindowPosition, #getWindowSize, #goBack, #goForward, #isElementDisplayed, #isElementEnabled, #isElementSelected, #maximizeWindow, #mouseDown, #mouseMoveTo, #mouseUp, #quit, #refresh, #removeLocalStorageItem, #removeSessionStorageItem, #sendKeysToActiveElement, #sendKeysToElement, #session_id, #setAlertValue, #setImplicitWaitTimeout, #setLocalStorageItem, #setLocation, #setNetworkConnection, #setScreenOrientation, #setScriptTimeout, #setSessionStorageItem, #setTimeout, #setVisible, #setWindowPosition, #setWindowSize, #status, #submitElement, #switchToDefaultContent, #switchToFrame, #switchToParentFrame, #switchToWindow, #touchDoubleTap, #touchDown, #touchElementFlick, #touchFlick, #touchLongPress, #touchMove, #touchScroll, #touchSingleTap, #touchUp, #upload

Methods included from BridgeHelper

#element_id_from, #parse_cookie_string, #unwrap_script_result

Constructor Details

#initialize(opts = {}) ⇒ Bridge

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Bridge.



32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/selenium/webdriver/android/bridge.rb', line 32

def initialize(opts = {})
  warn 'The Android driver is deprecated - please use either http://selendroid.io or http://appium.io instead.'

  remote_opts = {
    :url                  => opts.fetch(:url, DEFAULT_URL),
    :desired_capabilities => opts.fetch(:desired_capabilities, capabilities),
  }

  remote_opts[:http_client] = opts[:http_client] if opts.has_key?(:http_client)

  super remote_opts
end

Instance Method Details

#browserObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



45
46
47
# File 'lib/selenium/webdriver/android/bridge.rb', line 45

def browser
  :android
end

#capabilitiesObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



61
62
63
# File 'lib/selenium/webdriver/android/bridge.rb', line 61

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

#driver_extensionsObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



49
50
51
52
53
54
55
56
57
58
59
# File 'lib/selenium/webdriver/android/bridge.rb', line 49

def driver_extensions
  [
    DriverExtensions::TakesScreenshot,
    DriverExtensions::Rotatable,
    DriverExtensions::HasInputDevices,
    DriverExtensions::HasWebStorage,
    DriverExtensions::HasLocation,
    DriverExtensions::HasNetworkConnection,
    DriverExtensions::HasTouchScreen
  ]
end