Mobile JSON Wire Protocol
getContext
Mobile JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
driver.getContext()
Returns
- <Context>
context
: a string representing the current context or null representing 'no context'
switchContext
Mobile JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
driver.switchContext(name)
Parameters
Name | Type | Details |
---|---|---|
name | string | a string representing an available context |
getContexts
Mobile JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
driver.getContexts()
Returns
- <Context[]>
contexts
: an array of strings representing available contexts, e.g. 'WEBVIEW', or 'NATIVE'
getPageIndex
Mobile JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
driver.getPageIndex()
Returns
- <string>
pageIndex
:
getNetworkConnection
Mobile JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
driver.getNetworkConnection()
Returns
- <number>
connectionType
: see https://appium.github.io/appium.io/docs/en/writing-running-appium/other/network-connection/
setNetworkConnection
Mobile JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
driver.setNetworkConnection(type)
Parameters
Name | Type | Details |
---|---|---|
type | number | a bit mask that should be translated to an integer value when serialized |
touchPerform
Mobile JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
driver.touchPerform(actions)
Parameters
Name | Type | Details |
---|---|---|
actions | object[] | a list of objects, each of which represents an input source and its associated actions |
multiTouchPerform
Mobile JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
driver.multiTouchPerform(actions, elementId)
Parameters
Name | Type | Details |
---|---|---|
actions | object[] | a list of objects, each of which represents an input source and its associated actions |
elementId optional | object[] | the id of an element returned in a previous call to Find Element(s) |
receiveAsyncResponse
Mobile JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
driver.receiveAsyncResponse(status, value)
Parameters
Name | Type | Details |
---|---|---|
status | string | the expected status of the response |
value | string | the expected value of the response |