JSON Wire Protocol
The following is a list of legacy JSON Wire Protocol (JSONWP) endpoints used in Appium.
getSession¶
JSONWP documentation: /session/:sessionId
Retrieves the capabilities of the current session.
Appium implements a modified version of this endpoint. If the appium:eventTimings
capability is
set to true
, the returned result will additionally include the events
key, whose value contains
the event history and timings.
Deprecated
For retrieving capabilities, please use getAppiumSessionCapabilities
.
For retrieving event history, please use getLogEvents
.
Response¶
Capabilities
- an object containing the session capabilities, and the event history (if applicable)
availableIMEEngines¶
JSONWP documentation: /session/:sessionId/ime/available_engines
Retrieves all IME (input method editor) engines available on the device under test.
Deprecated
In the future, this endpoint will be moved to the UiAutomator2 and Espresso drivers
Response¶
string[]
- a list of available IME engines
getActiveIMEEngine¶
JSONWP documentation: /session/:sessionId/ime/active_engine
Retrieves the name of the active IME engine.
Deprecated
In the future, this endpoint will be moved to the UiAutomator2 and Espresso drivers
Response¶
string
- the name of the active IME engine
isIMEActivated¶
JSONWP documentation: /session/:sessionId/ime/activated
Determines if IME input is available and active.
Deprecated
In the future, this endpoint will be moved to the UiAutomator2 and Espresso drivers
Response¶
boolean
- true
if IME is active, otherwise false
deactivateIMEEngine¶
JSONWP documentation: /session/:sessionId/ime/deactivate
Deactivates the currently active IME engine.
Deprecated
In the future, this endpoint will be moved to the UiAutomator2 and Espresso drivers
Response¶
null
activateIMEEngine¶
JSONWP documentation: /session/:sessionId/ime/activate
Activates an IME engine.
Deprecated
In the future, this endpoint will be moved to the UiAutomator2 and Espresso drivers
Parameters¶
Name | Description | Type |
---|---|---|
engine |
Name of the IME engine to activate | string |
Response¶
null
getOrientation¶
JSONWP documentation: /session/:sessionId/orientation
Retrieves the current orientation of the device under test.
Response¶
string
- either PORTRAIT
or LANDSCAPE
setOrientation¶
JSONWP documentation: /session/:sessionId/orientation
Sets the orientation of the device under test.
Parameters¶
Name | Description | Type |
---|---|---|
orientation |
New device orientation. Supported values are PORTRAIT or LANDSCAPE . |
string |
Response¶
null
getGeoLocation¶
JSONWP documentation: /session/:sessionId/location
Retrieves the current location of the device under test.
Deprecated
Please use driver-specific extension methods such as mobile: getGeoLocation
or
mobile: getSimulatedLocation
Response¶
Location
- an object with the following properties:
Name | Description | Type |
---|---|---|
altitude |
Altitude of the device location | number |
latitude |
Latitude of the device location | number |
longitude |
Longitude of the device location | number |
setGeoLocation¶
JSONWP documentation: /session/:sessionId/location
Sets the current location of the device under test.
Deprecated
Please use driver-specific extension methods such as mobile: setGeoLocation
or
mobile: setSimulatedLocation
Parameters¶
Name | Description | Type |
---|---|---|
location |
New device latitude, longitude and altitude | Location |
Response¶
null