Add mobile: getContexts to docs (#10814)

* Add mobile: getContexts to docs

* Address comments
This commit is contained in:
Isaac A. Murchie
2018-06-07 08:46:09 -04:00
committed by GitHub
parent 79e56f8697
commit 27df40944e
3 changed files with 10 additions and 3 deletions
@@ -8,6 +8,10 @@ description:
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.
For information on contexts, see Appium's [hybrid automation docs](/docs/en/writing-running-appium/web/hybrid.md).
+3
View File
@@ -7,6 +7,8 @@
Execute a variety of native, mobile commands that aren't associated with a specific endpoint
Syntax is `execute("mobile: <commandName>", <JSON serializable argument>)`
(see [Execute Script](/docs/en/commands/web/execute.md) for more details
on syntax).
List of available commands:
@@ -42,6 +44,7 @@
| mobile:setPasteboard | refer to [IOS Pasteboard Guide](/docs/en/writing-running-appium/ios/ios-xctest-pasteboard.md#mobile-setpasteboard) | | |
| mobile:getPasteboard | refer to [IOS Pasteboard Guide](/docs/en/writing-running-appium/ios/ios-xctest-pasteboard.md#mobile-getpasteboard) | | |
| mobile:installCertificate | refer to [IOS Pasteboard Guide](/docs/en/writing-running-appium/ios/ios-xctest-install-certificate.md) | | |
| mobile:getContexts | Retrieve available contexts, along with the url and title associated with each webview (see [get contexts](/docs/en/commands/context/get-contexts.md)) | | |
### Android
| Command | Description | Argument | Argument Example |
+3 -3
View File
@@ -10,7 +10,7 @@ description:
Arguments may be any JSON-primitive, array, or JSON object. JSON objects that define a WebElement reference will be converted to the corresponding DOM element. Likewise, any WebElements in the script result will be returned to the client as WebElement JSON objects.
For `execute` in the native context, see [Mobile Commands](/docs/en/commands/mobile-command.md).
example_usage:
java:
@@ -71,7 +71,7 @@ client_support:
csharp: true
javascript_wd: true
javascript_wdio: true
# Information about the HTTP endpoints
endpoint:
@@ -92,6 +92,6 @@ endpoint:
description: The script result
# Links to specifications. Should link to at least one specification
specifications:
specifications:
w3c: https://www.w3.org/TR/webdriver/#dfn-execute-script
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidexecute_async