Document app commands (#9383)

This commit is contained in:
Dan Graham
2017-10-06 10:27:46 -07:00
committed by GitHub
parent 5653e14188
commit 5860ea044b
7 changed files with 429 additions and 1 deletions

View File

@@ -0,0 +1,72 @@
---
name: Background App
short_description: Send the currently running app for this session to the background
example_usage:
java:
|
driver.runAppInBackground(Duration.ofSeconds(10));
python:
|
self.driver.background_app(10)
javascript_wd:
|
await driver.backgroundApp(10);
javascript_wdio:
|
driver.background(10);
ruby:
|
@driver.background_app(10)
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "http://appium.github.io/java-client/io/appium/java_client/InteractsWithApps.html#runAppInBackground-java.time.Duration-"
python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L529"
javascript_wdio: "http://webdriver.io/api/mobile/background.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2841"
ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/Core/Device:background_app"
php: "https://github.com/appium/php-client/" # TODO PHP documentation link
csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link
# Driver support by platform
driver_support:
ios:
xcuitest: true
uiautomation: true
android:
uiautomator2: true
uiautomator: true
mac:
mac: false
windows:
windows: false
client_support:
java: true
python: true
ruby: true
php: true
csharp: true
javascript_wd: true
javascript_wdio: true
# Information about the HTTP endpoints
endpoint:
url: /session/:session_id/appium/app/background
method: 'POST'
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: seconds
type: number
description: How long to run app in background. Minimum resolution time is one second.
# Links to specifications. Should link to at least one specification
specifications:
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/mjsonwp/routes.js#L439

View File

@@ -0,0 +1,68 @@
---
name: Close an App
short_description: Close an app on device
example_usage:
java:
|
driver.closeApp();
python:
|
self.driver.close_app()
javascript_wd:
|
await driver.closeApp();
javascript_wdio:
|
driver.close_app();
ruby:
|
@driver.close_app()
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "http://appium.github.io/java-client/io/appium/java_client/InteractsWithApps.html#closeApp--"
python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L584"
javascript_wdio: "http://webdriver.io/api/mobile/closeApp.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2798"
ruby: "https://github.com/appium/ruby_lib/blob/master/lib/appium_lib/core/common/command.rb#L10"
php: "https://github.com/appium/php-client/" # TODO PHP documentation link
csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link
# Driver support by platform
driver_support:
ios:
xcuitest: true
uiautomation: true
android:
uiautomator2: true
uiautomator: true
mac:
mac: false
windows:
windows: false
client_support:
java: true
python: true
ruby: true
php: true
csharp: true
javascript_wd: true
javascript_wdio: true
# Information about the HTTP endpoints
endpoint:
url: /session/:session_id/appium/app/close
method: 'POST'
url_parameters:
- name: session_id
description: ID of the session to route the command to
# Links to specifications. Should link to at least one specification
specifications:
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/mjsonwp/routes.js#L433

View File

@@ -0,0 +1,71 @@
---
name: End Test Coverage
short_description: Get test coverage data
example_usage:
java:
|
driver.endTestCoverage("Intent", "/path");
python:
|
self.driver.end_test_coverage("Intent", "/path")
javascript_wd:
|
await driver.endTestCoverageForApp("Intent", "/path");
ruby:
|
@driver.end_coverage("Intent", "/path")
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "http://appium.github.io/java-client/io/appium/java_client/android/AndroidDriver.html#endTestCoverage-java.lang.String-java.lang.String-"
python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L627"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2858"
ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/Android/Device:end_coverage"
php: "https://github.com/appium/php-client/" # TODO PHP documentation link
csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link
# Driver support by platform
driver_support:
ios:
xcuitest: false
uiautomation: false
android:
uiautomator2: true
uiautomator: true
mac:
mac: false
windows:
windows: false
client_support:
java: true
python: true
ruby: false
php: true
csharp: true
javascript_wd: true
javascript_wdio: true
# Information about the HTTP endpoints
endpoint:
url: /session/:session_id/appium/app/end_test_coverage
method: 'POST'
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: intent
type: string
description: Intent to broadcast
- name: path
type: string
description: Path to .ec file
# Links to specifications. Should link to at least one specification
specifications:
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/mjsonwp/routes.js#L442

View File

@@ -0,0 +1,75 @@
---
name: Get App Strings
short_description: Get app strings
example_usage:
java:
|
Map<String, String> appStrings = driver.getAppStringMap("en", "/path/to/file");
python:
|
appStrings = self.driver.app_strings("en", "/path/to/file")
javascript_wd:
|
let appStrings = await driver.getAppStrings();
javascript_wdio:
|
let appStrings = driver.getAppStrings("en");
ruby:
|
@driver.app_strings("en")
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "http://appium.github.io/java-client/io/appium/java_client/HasAppStrings.html#getAppStringMap--"
python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L357"
javascript_wdio: "http://webdriver.io/api/mobile/getAppStrings.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2916"
ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/Core/Device:app_strings"
php: "https://github.com/appium/php-client/" # TODO PHP documentation link
csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link
# Driver support by platform
driver_support:
ios:
xcuitest: true
uiautomation: true
android:
uiautomator2: true
uiautomator: true
mac:
mac: false
windows:
windows: false
client_support:
java: true
python: true
ruby: true
php: true
csharp: true
javascript_wd: true
javascript_wdio: true
# Information about the HTTP endpoints
endpoint:
url: /session/:session_id/appium/app/strings
method: 'POST'
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: language
type: string
description: Language code (optional)
- name: stringFile
type: string
description: Path to the string file (optional)
# Links to specifications. Should link to at least one specification
specifications:
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/mjsonwp/routes.js#L445

View File

@@ -0,0 +1,68 @@
---
name: Launch an App
short_description: Launch an app on device
example_usage:
java:
|
driver.launchApp();
python:
|
self.driver.launch_app()
javascript_wd:
|
await driver.launchApp();
javascript_wdio:
|
driver.launch();
ruby:
|
@driver.launch_app()
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "http://appium.github.io/java-client/io/appium/java_client/InteractsWithApps.html#launchApp--"
python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L578"
javascript_wdio: "http://webdriver.io/api/mobile/launch.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2798"
ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/Core/Device:launch_app"
php: "https://github.com/appium/php-client/" # TODO PHP documentation link
csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link
# Driver support by platform
driver_support:
ios:
xcuitest: true
uiautomation: true
android:
uiautomator2: true
uiautomator: true
mac:
mac: false
windows:
windows: false
client_support:
java: true
python: true
ruby: true
php: true
csharp: true
javascript_wd: true
javascript_wdio: true
# Information about the HTTP endpoints
endpoint:
url: /session/:session_id/appium/app/launch
method: 'POST'
url_parameters:
- name: session_id
description: ID of the session to route the command to
# Links to specifications. Should link to at least one specification
specifications:
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/mjsonwp/routes.js#L430

View File

@@ -0,0 +1,68 @@
---
name: Reset App
short_description: Reset the currently running app for this session
example_usage:
java:
|
driver.resetApp();
python:
|
self.driver.reset()
javascript_wd:
|
await driver.resetApp();
javascript_wdio:
|
driver.reset();
ruby:
|
@driver.reset()
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "http://appium.github.io/java-client/io/appium/java_client/InteractsWithApps.html#resetApp--"
python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L372"
javascript_wdio: "http://webdriver.io/api/mobile/reset.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2827"
ruby: "https://github.com/appium/ruby_lib/blob/master/lib/appium_lib/core/common/command.rb#L11"
php: "https://github.com/appium/php-client/" # TODO PHP documentation link
csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link
# Driver support by platform
driver_support:
ios:
xcuitest: true
uiautomation: true
android:
uiautomator2: true
uiautomator: true
mac:
mac: false
windows:
windows: false
client_support:
java: true
python: true
ruby: true
php: true
csharp: true
javascript_wd: true
javascript_wdio: true
# Information about the HTTP endpoints
endpoint:
url: /session/:session_id/appium/app/reset
method: 'POST'
url_parameters:
- name: session_id
description: ID of the session to route the command to
# Links to specifications. Should link to at least one specification
specifications:
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/mjsonwp/routes.js#L436

View File

@@ -162,7 +162,13 @@ module.exports = {
["App", ["app",
["Install App", "install-app.md"],
["Remove App", "remove-app.md"],
["Is App Installed", "is-app-installed.md"]
["Is App Installed", "is-app-installed.md"],
["Launch App", "launch-app.md"],
["Close App", "close-app.md"],
["Reset App", "reset-app.md"],
["Background App", "background-app.md"],
["End Test Coverage", "end-test-coverage.md"],
["Get App Strings", "get-app-strings.md"],
]],
["Keys", ["keys",
["Hide Keyboard", "hide-keyboard.md"],