diff --git a/packages/appium/docs/ja/reference/api/appium.md b/packages/appium/docs/ja/reference/api/appium.md index 05b51ece1..781988040 100644 --- a/packages/appium/docs/ja/reference/api/appium.md +++ b/packages/appium/docs/ja/reference/api/appium.md @@ -107,6 +107,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 ``` @@ -393,3 +435,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` diff --git a/packages/appium/docs/ja/reference/api/jsonwp.md b/packages/appium/docs/ja/reference/api/jsonwp.md index a59237546..3fa7645d0 100644 --- a/packages/appium/docs/ja/reference/api/jsonwp.md +++ b/packages/appium/docs/ja/reference/api/jsonwp.md @@ -140,6 +140,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` @@ -154,6 +158,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 | diff --git a/packages/appium/docs/ja/reference/api/mjsonwp.md b/packages/appium/docs/ja/reference/api/mjsonwp.md index bffc7fc8b..9c8da2dfe 100644 --- a/packages/appium/docs/ja/reference/api/mjsonwp.md +++ b/packages/appium/docs/ja/reference/api/mjsonwp.md @@ -21,6 +21,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: @@ -41,6 +45,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 | @@ -63,6 +71,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 @@ -77,6 +89,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 | @@ -97,6 +113,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 diff --git a/packages/appium/docs/ja/reference/cli/server.md b/packages/appium/docs/ja/reference/cli/server.md index 448db273c..aa69246ed 100644 --- a/packages/appium/docs/ja/reference/cli/server.md +++ b/packages/appium/docs/ja/reference/cli/server.md @@ -65,7 +65,7 @@ appium | `--tmp` | Absolute path to the directory used for temporary files | string | [`os.tmpdir()`](https://nodejs.org/api/os.html#ostmpdir) | | `--use-drivers` | List of drivers to activate. By default, all installed drivers are activated. | array | `[]` | | `--use-plugins` | List of plugins to activate. By default, no plugins are activated. Set to `["all"]` to activate all installed plugins. | array | `[]` | -| `--webhook`, `-G` | URL for an HTTP listener where the server logs should be output. This does not affect output on the console. | string | | +| `--webhook`, `-G` | URL for an HTTP listener where the server logs should be output. This does not affect output on the console. A bare `host:port` is also accepted, which posts the logs to the root path over plain http; a value having neither a scheme nor a port falls back to `127.0.0.1:9003`. | string | | ### Info Options diff --git a/packages/appium/docs/zh/reference/api/appium.md b/packages/appium/docs/zh/reference/api/appium.md index 05b51ece1..781988040 100644 --- a/packages/appium/docs/zh/reference/api/appium.md +++ b/packages/appium/docs/zh/reference/api/appium.md @@ -107,6 +107,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 ``` @@ -393,3 +435,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` diff --git a/packages/appium/docs/zh/reference/api/jsonwp.md b/packages/appium/docs/zh/reference/api/jsonwp.md index a59237546..3fa7645d0 100644 --- a/packages/appium/docs/zh/reference/api/jsonwp.md +++ b/packages/appium/docs/zh/reference/api/jsonwp.md @@ -140,6 +140,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` @@ -154,6 +158,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 | diff --git a/packages/appium/docs/zh/reference/api/mjsonwp.md b/packages/appium/docs/zh/reference/api/mjsonwp.md index bffc7fc8b..9c8da2dfe 100644 --- a/packages/appium/docs/zh/reference/api/mjsonwp.md +++ b/packages/appium/docs/zh/reference/api/mjsonwp.md @@ -21,6 +21,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: @@ -41,6 +45,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 | @@ -63,6 +71,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 @@ -77,6 +89,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 | @@ -97,6 +113,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 diff --git a/packages/appium/docs/zh/reference/cli/server.md b/packages/appium/docs/zh/reference/cli/server.md index 448db273c..aa69246ed 100644 --- a/packages/appium/docs/zh/reference/cli/server.md +++ b/packages/appium/docs/zh/reference/cli/server.md @@ -65,7 +65,7 @@ appium | `--tmp` | Absolute path to the directory used for temporary files | string | [`os.tmpdir()`](https://nodejs.org/api/os.html#ostmpdir) | | `--use-drivers` | List of drivers to activate. By default, all installed drivers are activated. | array | `[]` | | `--use-plugins` | List of plugins to activate. By default, no plugins are activated. Set to `["all"]` to activate all installed plugins. | array | `[]` | -| `--webhook`, `-G` | URL for an HTTP listener where the server logs should be output. This does not affect output on the console. | string | | +| `--webhook`, `-G` | URL for an HTTP listener where the server logs should be output. This does not affect output on the console. A bare `host:port` is also accepted, which posts the logs to the root path over plain http; a value having neither a scheme nor a port falls back to `127.0.0.1:9003`. | string | | ### Info Options