From 2b57b762a4cae95329d45fc7082ef08fdffc7fcb Mon Sep 17 00:00:00 2001 From: Appium Triager Date: Thu, 1 Oct 2020 01:20:20 -0700 Subject: [PATCH] docs: Update generated docs [ci skip] (#14777) Co-authored-by: runner --- docs/en/commands/context/get-contexts.md | 2 +- docs/en/commands/mobile-command.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/en/commands/context/get-contexts.md b/docs/en/commands/context/get-contexts.md index 78810f2d7..f8a5802f8 100644 --- a/docs/en/commands/context/get-contexts.md +++ b/docs/en/commands/context/get-contexts.md @@ -57,7 +57,7 @@ List AllContexts = new List(); ## Description Retrieve all the contexts available to be automated. This will include, at least, the native context. There can also be zero or more web view contexts. For information on the format of the context names, see the [get context documentation](/docs/en/commands/context/get-context.md). -On iOS, using the XCUITest driver, one can use the `mobile: getContexts` [mobile command](/docs/en/commands/mobile-command.md) as an alternative to the standard method in order to get the title and url associated with each context as additional metadata. +[mobile command](/docs/en/commands/mobile-command.md) `mobile: getContexts` is available on iOS (XCUITest) and Android (UIAutomator2 and Espresso) to get more detailed contexts. For information on contexts, see Appium's [hybrid automation docs](/docs/en/writing-running-appium/web/hybrid.md). diff --git a/docs/en/commands/mobile-command.md b/docs/en/commands/mobile-command.md index 89034001b..2848adba5 100644 --- a/docs/en/commands/mobile-command.md +++ b/docs/en/commands/mobile-command.md @@ -131,6 +131,7 @@ List of available commands: | mobile:deleteFile | Delete a file on the device under test. The remote path value should be the full path or a file inside an application bundle. | `{remotePath}` | `{remotePath: '@io.appium.example/path/in/bundle'}`, `{remotePath: '/tmp/data/file'}` | | mobile:startService | Starts the given service by calling `am start-service` or `am start-foreground-service` under the hood since Appium 1.18.0. The `intent` argument is mandatory. `user` is the ID of the user the service should be started for (the current user ID is used by default). If `foreground` is set to `true` then the service will be started in foreground. | `{intent, user, foreground}` | `{intent: 'my.app/my.activity', foreground: true}` | | mobile:stopService | Stops the given service by calling `am stop-service` under the hood since Appium 1.18.0. The `intent` argument is mandatory. `user` is the ID of the user the service should be stopped for (the current user ID is used by default). | `{intent, user}` | `{intent: 'my.app/my.activity'}` | +| mobile:getContexts | Retrieve available contexts, along with details associated with each webview (see [get contexts](/docs/en/commands/context/get-contexts.md)) in JSON structure. The details of each webview includes such as android package name and its window handles details (see [get handles](/docs/en/commands/web/window/get-handles.md)). The details of each window handle (which donated as `pages` in the JSON) contains such as url, title and id. The id is part of a window handle name. Therefore, by concatenating a string like "CDwindow-" + id, you can use the string for switching to window (see [set window](/docs/en/commands/web/window/set-window.md).) | | | ### Android (UiAutomator2 only) | Command | Description | Argument | Argument Example |