docs: add new /appium prefixed routes (#22646)

This commit is contained in:
Edgars Eglītis
2026-08-20 23:10:27 +03:00
committed by GitHub
parent d5b316031e
commit 91446df648
3 changed files with 138 additions and 0 deletions
@@ -106,6 +106,48 @@ Retrieves the [execute methods](../../guides/execute-methods.md) supported in th
origin (driver-specific or plugin-specific). Refer to [the type definition file](https://github.com/appium/appium/blob/master/packages/types/lib/command.ts)
for a detailed structure of this object.
### getCurrentAppiumContext
```
GET /session/:sessionId/appium/context
```
Retrieves the active application context.
#### Response
`string` - the name of the active context
### setAppiumContext
```
POST /session/:sessionId/appium/context
```
Sets an application context as the active context.
#### Parameters
|Name|Description|Type|
|--|--|--|
|`name`|Name of the context to set as the active one|string|
#### Response
`null`
### getAppiumContexts
```
GET /session/:sessionId/appium/contexts
```
Retrieves all available application contexts.
#### Response
`string[]` - the names of available contexts
### getLogEvents
```
@@ -392,3 +434,71 @@ Retrieves data from a directory on the device under test.
#### Response
`string` - the Base64-encoded zip file of the directory contents
### getAppiumRotation
```
GET /session/:sessionId/appium/device/rotation
```
Retrieves the current spatial orientation of the device under test.
#### Response
`Rotation` - an object with the following properties:
|Name|Description|Type|
|--|--|--|
|`x`|Degrees by which the device is rotated on its X axis|number|
|`y`|Degrees by which the device is rotated on its Y axis|number|
|`z`|Degrees by which the device is rotated on its Z axis|number|
### setAppiumRotation
```
POST /session/:sessionId/appium/device/rotation
```
Sets the spatial orientation of the device under test.
#### Parameters
|Name|Description|Type|
|--|--|--|
|`x`|Degrees by which the device is rotated on its X axis|number|
|`y`|Degrees by which the device is rotated on its Y axis|number|
|`z`|Degrees by which the device is rotated on its Z axis|number|
#### Response
`null`
### getAppiumOrientation
```
GET /session/:sessionId/appium/device/orientation
```
Retrieves the current orientation of the device under test.
#### Response
`string` - either `PORTRAIT` or `LANDSCAPE`
### setAppiumOrientation
```
POST /session/:sessionId/appium/device/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`
@@ -139,6 +139,10 @@ GET /session/:sessionId/orientation
Retrieves the current orientation of the device under test.
!!! warning "Deprecated"
Please use [`getAppiumOrientation`](./appium.md#getappiumorientation) instead
#### Response
`string` - either `PORTRAIT` or `LANDSCAPE`
@@ -153,6 +157,10 @@ POST /session/:sessionId/orientation
Sets the orientation of the device under test.
!!! warning "Deprecated"
Please use [`setAppiumOrientation`](./appium.md#setappiumorientation) instead
#### Parameters
|Name|Description|Type|
@@ -20,6 +20,10 @@ GET /session/:sessionId/rotation
Retrieves the current spatial orientation of the device under test.
!!! warning "Deprecated"
Please use [`getAppiumRotation`](./appium.md#getappiumrotation) instead
#### Response
`Rotation` - an object with the following properties:
@@ -40,6 +44,10 @@ POST /session/:sessionId/rotation
Sets the spatial orientation of the device under test.
!!! warning "Deprecated"
Please use [`setAppiumRotation`](./appium.md#setappiumrotation) instead
#### Parameters
|Name|Description|Type|
@@ -62,6 +70,10 @@ GET /session/:sessionId/context
Retrieves the active application context.
!!! warning "Deprecated"
Please use [`getCurrentAppiumContext`](./appium.md#getcurrentappiumcontext) instead
#### Response
`string` - the name of the active context
@@ -76,6 +88,10 @@ POST /session/:sessionId/context
Sets an application context as the active context.
!!! warning "Deprecated"
Please use [`setAppiumContext`](./appium.md#setappiumcontext) instead
#### Parameters
|Name|Description|Type|
@@ -96,6 +112,10 @@ GET /session/:sessionId/contexts
Retrieves all available application contexts.
!!! warning "Deprecated"
Please use [`getAppiumContexts`](./appium.md#getappiumcontexts) instead
#### Response
`string[]` - the names of available contexts