Class: Selenium::WebDriver::Android::Bridge
Constant Summary
collapse
- DEFAULT_URL =
"http://#{Platform.localhost}:8080/wd/hub/"
Remote::Bridge::QUIT_ERRORS
Instance Attribute Summary
#context, #file_detector, #http
Instance Method Summary
collapse
#acceptAlert, #addCookie, #clearElement, #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, #getCapabilities, #getCurrentUrl, #getCurrentWindowHandle, #getElementAttribute, #getElementLocation, #getElementLocationOnceScrolledIntoView, #getElementSize, #getElementTagName, #getElementText, #getElementValue, #getElementValueOfCssProperty, #getPageSource, #getScreenshot, #getTitle, #getVisible, #getWindowHandles, #goBack, #goForward, #isElementDisplayed, #isElementEnabled, #isElementSelected, #mouseDown, #mouseMoveTo, #mouseUp, #quit, #refresh, #sendKeysToActiveElement, #sendKeysToElement, #sendModifierKeyToActiveElement, #session_id, #setAlertValue, #setElementSelected, #setImplicitWaitTimeout, #setScriptTimeout, #setVisible, #submitElement, #switchToDefaultContent, #switchToFrame, #switchToWindow, #upload
#element_id_from, #parse_cookie_string, #unwrap_script_result
Constructor Details
#initialize(opts = {}) ⇒ Bridge
Returns a new instance of Bridge.
8
9
10
11
12
13
14
15
16
17
|
# File 'lib/selenium/webdriver/android/bridge.rb', line 8
def initialize(opts = {})
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
#browser ⇒ Object
19
20
21
|
# File 'lib/selenium/webdriver/android/bridge.rb', line 19
def browser
:android
end
|
#capabilities ⇒ Object
39
40
41
|
# File 'lib/selenium/webdriver/android/bridge.rb', line 39
def capabilities
@capabilities ||= Remote::Capabilities.android
end
|
#driver_extensions ⇒ Object
#getScreenOrientation ⇒ Object
35
36
37
|
# File 'lib/selenium/webdriver/android/bridge.rb', line 35
def getScreenOrientation
execute :getScreenOrientation
end
|
#setScreenOrientation(orientation) ⇒ Object
31
32
33
|
# File 'lib/selenium/webdriver/android/bridge.rb', line 31
def setScreenOrientation(orientation)
execute :setScreenOrientation, {}, :orientation => orientation
end
|