mirror of
https://github.com/appium/appium.git
synced 2026-10-29 04:36:39 +08:00
Add mobile: getContexts to docs (#10814)
* Add mobile: getContexts to docs * Address comments
This commit is contained in:
@@ -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).
|
||||
|
||||
|
||||
@@ -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 |
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user