跳转至

JSON Wire Protocol

The following is a list of legacy JSON Wire Protocol (JSONWP) endpoints supported in Appium.

getOrientation

GET /session/:sessionId/orientation

JSONWP documentation: /session/:sessionId/orientation

Retrieves the current orientation of the device under test.

Deprecated

Please use getAppiumOrientation instead

Response

string - either PORTRAIT or LANDSCAPE

setOrientation

POST /session/:sessionId/orientation

JSONWP documentation: /session/:sessionId/orientation

Sets the orientation of the device under test.

Deprecated

Please use setAppiumOrientation instead

Parameters

Name Description Type
orientation New device orientation. Supported values are PORTRAIT or LANDSCAPE. string

Response

null