Compare commits

...
Author SHA1 Message Date
Isaac Murchie 5b98b9197e v1.8.2-beta 2018-05-24 08:35:24 -04:00
Isaac A. Murchie da6cc758db Merge master 2018-05-24 08:00:56 -04:00
Isaac A. Murchie f281fd60d5 Update appium-android-driver (#10740) 2018-05-24 07:57:16 -04:00
Isaac A. Murchie 03affbe51d Merge from master 2018-05-24 07:56:14 -04:00
Sumanth 45654140ce Updating broken links (#10735)
Fixing the links which are redirected to 404 page in yaml file.
2018-05-24 07:53:25 -04:00
Dan Graham cebbc6e56b Explain how to generate docs (#10541)
* Explain how to generate docs

* Documentation updates
2018-05-24 07:53:14 -04:00
Kazuaki Matsuo 16ebb5f4fa update the descriptions of caps for android (#10702)
* update the descriptions

* tweak reviews

* add a link to the control flow

* remove a link to code

* tweak the description of appWaitActivity
2018-05-24 07:53:05 -04:00
Mykola Mokhnach 3b547e696a Add documentation on image comparison features (#10711) 2018-05-24 07:52:56 -04:00
Dan Graham 2f97bc4a6f Add VSCode launch configurations (#10683)
* Added debug, attach to debug, test-all, and test-current-file
* The debug and attach to debug allow you to run Appium server
* Made some changes to how package.json is located to support being able to run Mocha tests directly from 'test/' instead of from 'build/test/'
2018-05-24 07:52:45 -04:00
Dan Graham e31d97af76 1.8.1 changelog (#10667) 2018-05-22 16:06:41 -07:00
dan@saucelabs.com 0e2334299e Update dependencies 2018-05-22 16:02:24 -07:00
Isaac A. Murchie d67590c722 1.8.1 2018-05-17 16:03:54 -07:00
dan@saucelabs.com b590d9e9e8 1.8.1-beta1 2018-05-08 11:38:43 -07:00
dan@saucelabs.com b30fefb2c8 v1.8.1-beta 2018-05-08 11:26:12 -07:00
Isaac A. Murchie a5d7bd84dd Update dependencies (#10666) 2018-05-08 10:04:14 -07:00
Dan Graham 379cf64994 Re-enable package-lock.json (#10660) 2018-05-08 10:00:31 -07:00
Isaac A. Murchie 2b1ec777c0 Prepare for v1.8.0 2018-04-20 10:53:59 -07:00
Dan Graham 7219f1256b Recommend coldboot in troubleshooting (#10516)
* I found that sometimes ADB can't find the device even after running `adb kill-server`
* The problem was that it was loaded using Fastboot and emulator doesn't always show up as online
* Fixed by closing emulator and then doing coldboot
2018-04-11 10:14:53 -05:00
Kazuaki Matsuo 831d21143d Add docs of clipboard (#10451)
* add clipboard with yml

* add generated docs for clipboard

* update descriptions and commands

* apply reviews
2018-04-11 10:14:42 -05:00
dan@saucelabs.com 892f91928c Prepare for v1.8.0-beta5 2018-04-10 16:08:11 -07:00
Dan Graham 67e41af8d4 Add otherApps to caps (#10460) 2018-04-10 15:06:11 -07:00
Isaac A. Murchie 439a75ce38 Add unnecessary stuff to npmignore (#10505) 2018-04-10 15:06:05 -07:00
Mykola Mokhnach 625da250fa Fix server property assignment in the umbrella driver (#10496) 2018-04-10 15:05:58 -07:00
Isaac A. Murchie 5dbac38d86 Add new chromedriver caps to docs (#10448) 2018-04-10 15:05:44 -07:00
Isaac Murchie c813f39791 Update docs 2018-04-10 15:05:37 -07:00
Andres Galindo dda355f65c Added support for hub protocol (#10434) 2018-04-10 15:05:27 -07:00
Isaac A. Murchie e0cc59dd94 Update Chromedriver docs (#10436)
* Update Chromedriver docs

Chromedriver 2.37 is out so add its minimum Chrome version to the table.

* Typo

* Add 2.5 and 2.6 mapping
2018-04-10 15:05:14 -07:00
dan@saucelabs.com a568ba58d2 Prepare for 1.8.0-beta4 2018-03-27 16:40:31 -07:00
Dan Graham cfbce46cb2 Pass protocol in execute command (#10362)
* Make it so executeCommand returns protocol and value/error
  * This is so that base driver can read the protocol and serve the response (base driver doesn't know what the protocol of the inner drivers are)
  * Added tests to confirm that it falls back to MJSONWP if an inner driver is not ready and handles concurrent MJSONWP and W3C sessions
  * Updated unit tests to match the new format
2018-03-27 16:40:31 -07:00
Jonathan Lipps f9d1849e1a Merge pull request #10406 from janpio/patch-1
[Docs] Add Apache Cordova to introduction
2018-03-27 16:40:31 -07:00
Mykola Mokhnach be6a8adc7c Attach server instance to each driver being created (#10400) 2018-03-27 16:40:31 -07:00
Jonathan Lipps 1d3b4debab Merge pull request #10398 from appium/isaac-source-docs
Add source docs to table of contents
2018-03-27 16:40:31 -07:00
Mykola Mokhnach 2067d69a5d Alter performance documentation (#10367) 2018-03-27 16:40:31 -07:00
Mykola Mokhnach 1f6bdaf570 Add documentation for performance tools available for iOS (#10348)
* Add documentation for performance tools available for iOS

* Fix grammar
2018-03-27 16:40:31 -07:00
Jonathan Lipps 23cc85ae24 Merge pull request #10335 from saikrishna321/master
added uiAutomator2 caps
2018-03-27 16:40:31 -07:00
Kazuaki Matsuo 57f8e05f03 add network related commands for Ruby (#10251)
* add network related commands for Ruby

* set client_support true
2018-02-26 15:50:31 -05:00
Kazuaki Matsuo cf47698327 add commands of power ac and power capacity (#10253) 2018-02-26 15:50:22 -05:00
Dan Graham 91ab4a6b3b Doc fix (#10234) 2018-02-26 15:50:14 -05:00
trixo 8e017aaa15 docs update (#10231) 2018-02-26 15:50:06 -05:00
Dan Graham 6d3c3c9a4f Go back to using nodeca/argparse (#10205) 2018-02-26 15:49:59 -05:00
Dan Graham 58d96221ba Fix customSSLCert documentation error (#10155)
Should be Sim only, not Sim/Emu
2018-02-15 08:42:45 -05:00
Isaac Murchie 40d4728519 Bump appium-ios-driver to 2.0 2018-02-15 08:40:30 -05:00
Kazuaki Matsuo 044246bb84 Update settings.md (#10196)
* Update settings.md

* fix review
2018-02-15 08:40:20 -05:00
Dan Graham 029b35e990 Use appium argparse (#10191) 2018-02-15 08:40:11 -05:00
Isaac A. Murchie 959b098816 Move to minimum node 6 (#10180) 2018-02-15 08:40:03 -05:00
Isaac A. Murchie 3a10b18dfb Update Contributing Docs (#10165)
* Update contributing docs

* Fix some links and examples

* Address comments
2018-02-15 08:39:52 -05:00
Isaac A. Murchie 83989943bc Update android driver version (#10163) 2018-02-15 08:39:45 -05:00
Dan Graham 619447214b Fix outdated test (#10162) 2018-02-15 08:39:37 -05:00
Nick Fox a4a4d9aeab Update migrating-to-xcuitest.md (#10112) 2018-02-15 08:39:28 -05:00
dan@saucelabs.com 4bf6c6e8fc Prepare for v1.8.0-beta3 2018-01-30 09:10:40 -08:00
dan@saucelabs.com b0f1e56ede Prepare for v1.8.0-beta2 2018-01-29 13:10:14 -08:00
Mykola Mokhnach b0857eefb1 Use uia2 backend by default if platform version is greater or equal to 6 (#10073)
* Use uia2 backend by default if platform version is greater or equal to 6

* Allow to force set the backend to UIA1

* Add unit tests

* Tune the log message

* Print a warning message instead of changing the driver type

* Remove redundant imports

* Tune the message

* Address PR comments
2018-01-29 11:31:37 -05:00
Dan Graham 8efff6895e Test content-type in errors (#10077) 2018-01-29 11:31:29 -05:00
Dan Graham 69eed603c3 Remove unnecessary 'finally' block (#10076)
* Shouldn't have had finally block because then it does two checks to fall back to MJSONWP
* Also fixed outdated tests
2018-01-29 11:31:20 -05:00
Dan Graham f91c6b50aa Fall back to MJSONWP if W3C is invalid (#10034)
* If processCapabilities throws error, then log a warning that it was invalid and log the message and fall back to using jsonwpCaps
2018-01-29 11:31:10 -05:00
Dan Graham 46395d7c46 Use MJSONWP if dcaps have extraneous params (#10019)
* Update `parseCapsForInnerDriver` so that now if it finds extraneous keys in `jsonwpCaps`, fall back to using MJSONWP instead of W3C
* After getting processed caps, check the protocol again because if `processedW3CCapabilities` was set to null, it should be JWP
* Removed tests that tested for capabilities being merged together (those are no longer needed)
* Added tests (unit test and e2e test) that check that creation of a new session will fall back to JSONWP when there are extraneous keys
2018-01-29 11:30:59 -05:00
Isaac A. Murchie 5a2cf8d1c4 Get rid of arrow functions in mocha aparatus (#10013) 2018-01-29 11:30:49 -05:00
Isaac A. Murchie 281b3cfdeb Add 2.34 and 2.35 to Chromedriver compatibility doc (#10012) 2018-01-29 11:30:39 -05:00
163 changed files with 2519 additions and 1217 deletions
+6 -2
View File
@@ -1,6 +1,12 @@
assets/
submodules/
test/
coverage/
commands-yml/
docs/
sample-code/
.vscode/
_vimrc_local.vim
*.swp
*.swo
@@ -12,5 +18,3 @@ _vimrc_local.vim
*.trace
*.sublime-
*.prefs
./.npmignore
coverage
+2 -1
View File
@@ -1 +1,2 @@
package-lock=false
# Do not disable package-lock. Disabling package-lock also disables npm-shrinkwrap
package-lock=true
+46
View File
@@ -0,0 +1,46 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug",
"type": "node",
"request": "launch",
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
"args": [
"."
]
},
{
"name": "Attach Debug",
"type": "node",
"request": "attach",
"cwd": "${workspaceFolder}",
"port": 9229
},
{
"name": "Test All",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/node_modules/.bin/_mocha",
"args": [
"--require", "babel-core/register",
"--timeout", "999999",
"--colors",
"${workspaceFolder}/test"
]
},
{
"name": "Test Current File",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/node_modules/.bin/_mocha",
"args": [
"--require", "babel-core/register",
"--timeout", "999999",
"--colors",
"${file}"
]
}
]
}
+82
View File
@@ -1,3 +1,83 @@
CHANGES IN VERSION 1.8.1 (from 1.8.0)
===================================
Appium 1.8.1 introduces multiple fixes and features. Most notably, it improves the performance of XCUITest
getPageSource.
#### General
* Fix shrinkwrap problem caused due to package-lock being set to false (#10660)
#### iOS
* Add keyboard presence verification endpoint (see http://appium.io/docs/en/commands/device/keys/is-keyboard-shown/)
* Add `mobile:startLogsBroadcast` feature (see http://appium.io/docs/en/commands/mobile-command/)
* Add cap called `realDeviceScreenshotter` to use idevicescreenshot for real device screenshots
* Add application platform verification
* Validates that `webdriverAgentUrl` capability is a valid URL
* Add an extension to retrieve battery info from a real device
* Fix Safari console log retrieval
#### Android
* Return the current connection state instead of undefined for setNetworkConnection
* Add a possibility to include stderr output into adb:shell call (see https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/android-shell.md#supported-arguments)
* Add flags argument to pressKeyCode so it is possible to generate IME actions if needed (UIAutomator2 only)
* Add a cap called `userProfile` which is an integer to enforce user profile while launching applications
* Make it possible to retrieve a battery info from the device under test (mobile:batteryInfo)
* Add `deviceApiLevel` to returned session capabilities (UIAutomator2 only)
* Fix passing suppressKillServer option while creating ADB instance
* Improve performance of swipe unlock action
* Improve restore from background behaviour
CHANGES IN VERSION 1.8.0 (from 1.7.2)
===================================
Appium 1.8.0 introduces full support for the [W3C WebDriver specification](https://www.w3.org/TR/webdriver/)
([digested version of the spec](https://github.com/jlipps/simple-wd-spec)).
#### General
* Minimum [NodeJS](https://nodejs.org/en/) version moved to 6
* Add methods for
* getting and setting the clipboard contents
* get full screen screenshots
* Application management
* More efficient app downloading by caching URLs
* All `moveTo` operations in touch actions now take coordinates as absolute
* Support for registering selenium grid through HTTPS by setting the configuration
key `"hubProtocol"` to `"https"`
* Add `otherApps` desired capability, to specify array of ancillary apps to install
on session creation
#### iOS
* Support for iOS 11.3/Xcode 9.3
* Fix handling of process arguments
* Add capabilities
* `shutdownOtherSimulators` - shutdown other running simulators at session start up
* Add ability to record screen
* Add support for complex gestures
* Fix handling of custom SSL certificate on simulators
* Better handling of `xcodebuild` processes
* Maintain keychains while upgrading apps
* Better handle simulators in unexpected states
* Add performance measuring (see [documentation](https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/ios/ios-xctest-performance.md))
#### Android
* Support for Android P (API Level 28)
* Known issue in screenshot: https://issuetracker.google.com/issues/76114030
* Fix handling of webview contexts when resetting apps
* Fix handling of screen recording
* Make sure intent is broadcast when file is uploaded
* Add possibility to broadcast device logs through WebSocket
* Chromedriver
* Bundle version 2.37
* Automatically choose compatible Chromedriver for Chrome version
* `chromedriverExecutableDir` capability to specify where Chromedrivers are located
* `chromedriverChromeMappingFile` capability to specify what Chromedriver version corresponds to what Chrome version
* Fix Handling of idle state waiting
* Speed up screenshot logic in UiAutomator2
* Allow disabling of notification watching through settings
* Fix parsing and granting of permissions for app under test
* Support deep linking and Android Instant Apps
CHANGES IN VERSION 1.8.0-beta (from 1.7.2)
===================================
@@ -244,6 +324,8 @@ the automation process configurable.
* Fix licensing in all dependencies.
#### Android
* Added handlers for basic system alerts, so now it is possible to accept/decline/get text of the most of
them using the standard Selenium's switchTo().alert() interface (UIA2 only)
* Fix backgrounding of app.
* Add `androidInstallPath` capability to specify where on the device apps are installed.
* Speed up taking screenshots on Android 5.0 and higher devices.
+1 -1
View File
@@ -8,7 +8,7 @@ Note that no matter how you contribute, your participation is governed by our
### Make changes to the Appium code or docs
Fork the project, make a change, and send a pull request! Please have a look at
our [Style Guide](/docs/en/contributing-to-appium/style-guide-2.0.md) before
our [Style Guide](/docs/en/contributing-to-appium/style-guide.md) before
getting to work. Please make sure the unit and functional tests pass before
sending a pull request; for more information on how to run tests, keep reading!
@@ -58,7 +58,7 @@ client_support:
# Information about the HTTP endpoints
endpoint:
url: /wd/hub/session/:session_id/device/current_activity
url: /wd/hub/session/:session_id/appium/device/current_activity
method: GET
url_parameters:
- name: session_id
@@ -69,4 +69,4 @@ endpoint:
# 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#L366
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L366
@@ -1,7 +1,7 @@
---
name: Get Current Package
short_description: Get the name of the current Android package
example_usage:
java:
|
@@ -50,11 +50,11 @@ client_support:
csharp: true
javascript_wd: true
javascript_wdio: false
# Information about the HTTP endpoints
endpoint:
url: /wd/hub/session/:session_id/device/current_package
url: /wd/hub/session/:session_id/appium/device/current_package
method: GET
url_parameters:
- name: session_id
@@ -64,5 +64,5 @@ endpoint:
description: Name of the current [package](https://developer.android.com/reference/java/lang/Package.html)
# 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#L369
specifications:
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L369
@@ -62,7 +62,7 @@ client_support:
# Information about the HTTP endpoints
endpoint:
url: /wd/hub/session/:session_id/device/start_activity
url: /wd/hub/session/:session_id/appium/device/start_activity
method: POST
url_parameters:
- name: session_id
@@ -95,4 +95,4 @@ endpoint:
# 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#L411
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L411
@@ -91,4 +91,4 @@ endpoint:
# 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
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L439
@@ -65,4 +65,4 @@ endpoint:
# 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
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L433
@@ -68,4 +68,4 @@ endpoint:
# 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
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L442
@@ -72,4 +72,4 @@ endpoint:
# 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
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L445
@@ -62,7 +62,7 @@ client_support:
# Information about the HTTP endpoints
endpoint:
url: /wd/hub/session/:session_id/device/install_app
url: /wd/hub/session/:session_id/appium/device/install_app
method: POST
url_parameters:
- name: session_id
@@ -74,4 +74,4 @@ endpoint:
# 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#L372
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L372
@@ -62,7 +62,7 @@ client_support:
# Information about the HTTP endpoints
endpoint:
url: /wd/hub/session/:session_id/device/app_installed
url: /wd/hub/session/:session_id/appium/device/app_installed
method: POST
url_parameters:
- name: session_id
@@ -77,4 +77,4 @@ endpoint:
# 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#L378
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L378
@@ -70,4 +70,4 @@ endpoint:
# 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
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L430
@@ -63,7 +63,7 @@ client_support:
# Information about the HTTP endpoints
endpoint:
url: /wd/hub/session/:session_id/device/remove_app
url: /wd/hub/session/:session_id/appium/device/remove_app
method: POST
url_parameters:
- name: session_id
@@ -78,4 +78,4 @@ endpoint:
# 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#L375
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L375
@@ -65,4 +65,4 @@ endpoint:
# 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
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L436
@@ -0,0 +1,77 @@
---
name: Get Clipboard
short_description: Get the content of the system clipboard
description:
>
Get the content of the system clipboard
example_usage:
java:
|
driver.getClipboard(ClipboardContentType.PLAINTEXT); // get plaintext
driver.getClipboardText();
python:
|
self.driver.get_clipboard()
self.driver.get_clipboard_text()
javascript_wd:
|
await driver.getClipboard();
javascript_wdio:
|
await driver.getClipboard();
ruby:
|
@driver.get_clipboard
php:
|
// PHP Code here
csharp:
|
// CSharp Code here
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/WebElement.html#click--"
python: "https://github.com/appium/python-client"
javascript_wdio: "http://webdriver.io/index.html"
javascript_wd: "https://github.com/admc/wd/releases"
ruby: "https://github.com/appium/ruby_lib/releases/latest"
php: "https://github.com/appium/php-client/releases/latest-"
csharp: "https://github.com/appium/appium" # TODO
# Driver support by platform
driver_support:
ios:
xcuitest: true
uiautomation: false
android:
uiautomator2: true
uiautomator: false
mac:
mac: false
windows:
windows: false
client_support:
java: true
python: true
ruby: true
php: false
csharp: false
javascript_wd: true
javascript_wdio: true
endpoint:
url: /wd/hub/session/:session_id/appium/device/get_clipboard
method: 'POST'
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: contentType
type: string
description: The type of the content to get. Plaintext, Image, URL. Android supports only plaintext.
response:
- type: string
description: Clipboard content as base64-encoded string or an empty string if the clipboard is empty
specifications: no
@@ -0,0 +1,84 @@
---
name: Set Clipboard
short_description: Set the content of the system clipboard
description:
>
Set the content of the system clipboard
example_usage:
java:
|
// base64Content is Base64-encoded content
driver.setClipboard("label", ClipboardContentType.PLAINTEXT, base64Content);
driver.setClipboardText("happy testing");
python:
|
self.driver.set_clipboard('happy testing')
self.driver.set_clipboard_text('happy testing')
javascript_wd:
|
await driver.setClipboard('happy testing', 'plaintext')
javascript_wdio:
|
await driver.setClipboard('happy testing', 'plaintext')
ruby:
|
@driver.set_clipboard content: 'happy testing'
php:
|
// PHP Code here
csharp:
|
// CSharp Code here
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/WebElement.html#click--"
python: "https://github.com/appium/python-client"
javascript_wdio: "http://webdriver.io/index.html"
javascript_wd: "https://github.com/admc/wd/releases"
ruby: "https://github.com/appium/ruby_lib/releases/latest"
php: "https://github.com/appium/php-client/releases/latest-"
csharp: "https://github.com/appium/appium" # TODO
# Driver support by platform
driver_support:
ios:
xcuitest: true
uiautomation: false
android:
uiautomator2: true
uiautomator: false
mac:
mac: false
windows:
windows: false
client_support:
java: true
python: true
ruby: true
php: false
csharp: false
javascript_wd: true
javascript_wdio: true
endpoint:
url: /wd/hub/session/:session_id/appium/device/set_clipboard
method: 'POST'
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: content
type: String
description: The actual base64 encoded clipboard content.
- name: contentType
type: string
description: The type of the content to get. Plaintext, Image, URL. Android supports only plaintext.
- name: label
type: string
description: Clipboard data label for Android.
response:
- type: string
description: Response from Appium server
specifications: no
@@ -0,0 +1,58 @@
---
name: Emulate power state
short_description: Emulate power state change on the connected emulator.
description:
|
For Android emulator.
To set the state of the battery charger to connected or not.
example_usage:
java:
|
driver.setPowerAC(PowerACState.OFF);
ruby:
|
@driver.set_power_ac :on
client_docs:
java: "http://appium.github.io/java-client/" # TODO: Link
ruby: "https://www.rubydoc.info/github/appium/ruby_lib_core/master/Appium/Android/Device/Emulator#set_power_ac-instance_method"
# 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: false
ruby: true
php: false
csharp: false
javascript_wd: false
javascript_wdio: false
# Information about the HTTP endpoints
endpoint:
url: /session/:session_id/appium/device/power_ac
method: 'POST'
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: state
type: string
description: set the state. on or off
# Links to specifications. Should link to at least one specification
specifications:
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L381
@@ -0,0 +1,57 @@
---
name: Emulate power capacity
short_description: Emulate power capacity change on the connected emulator.
description:
|
For Android emulator.
To set the battery percentage.
example_usage:
java:
|
driver.setPowerCapacity(100);
ruby:
|
@driver.set_power_capacity 50
client_docs:
java: "http://appium.github.io/java-client/" # TODO: Link
ruby: "https://www.rubydoc.info/github/appium/ruby_lib_core/master/Appium/Android/Device/Emulator#set_power_capacity-instance_method"
# 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: false
ruby: true
php: false
csharp: false
javascript_wd: false
javascript_wdio: false
# Information about the HTTP endpoints
endpoint:
url: /session/:session_id/appium/device/power_capacity
method: 'POST'
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: percent
type: integer
description: ercentage value in range [0, 100]
# Links to specifications. Should link to at least one specification
specifications:
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L378
@@ -73,4 +73,4 @@ endpoint:
# 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#L390
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L390
@@ -58,7 +58,7 @@ client_support:
# Information about the HTTP endpoints
endpoint:
url: /wd/hub/session/:session_id/device/pull_folder
url: /wd/hub/session/:session_id/appium/device/pull_folder
method: POST
url_parameters:
- name: session_id
@@ -73,4 +73,4 @@ endpoint:
# 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#L393
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L393
@@ -74,4 +74,4 @@ endpoint:
# 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#L387
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L387
@@ -66,4 +66,4 @@ endpoint:
# 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#L313
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L313
@@ -73,4 +73,4 @@ endpoint:
# 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#L307
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L307
@@ -1,7 +1,7 @@
---
name: Rotate
short_description: Rotate the device in three dimensions
example_usage:
java:
|
@@ -46,11 +46,11 @@ client_support:
csharp: true
javascript_wd: true
javascript_wdio: true
# Information about the HTTP endpoints
endpoint:
url: /wd/hub/session/:session_id/device/rotate
url: /wd/hub/session/:session_id/appium/device/rotate
method: 'POST'
url_parameters:
- name: session_id
@@ -76,5 +76,5 @@ endpoint:
description: The length of hold time for the specified gesture, in seconds.
# 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#L361
specifications:
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L361
@@ -67,4 +67,4 @@ endpoint:
# 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#L301
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L301
@@ -69,4 +69,4 @@ endpoint:
# 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#L310
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L310
@@ -82,4 +82,4 @@ endpoint:
# 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#L381
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L381
@@ -34,7 +34,7 @@ client_support:
csharp: false
javascript_wd: false
javascript_wdio: false
# Information about the HTTP endpoints
endpoint:
@@ -49,4 +49,4 @@ endpoint:
# 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#L384
jsonwp: routes.js
@@ -66,8 +66,11 @@ endpoint:
description: Key code pressed on the device. See [Key Event](http://developer.android.com/reference/android/view/KeyEvent.html).
- name: metastate
type: number
description: Metastate for the keypress
description: Metastate for the keypress. See [Key Event](http://developer.android.com/reference/android/view/KeyEvent.html).
- name: flags
type: number
description: Flags for the keypress. See [Key Event](http://developer.android.com/reference/android/view/KeyEvent.html).
# 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#L331
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L331
@@ -66,8 +66,11 @@ endpoint:
description: Key code pressed on the device. See [Key Event](http://developer.android.com/reference/android/view/KeyEvent.html).
- name: metastate
type: number
description: Metastate for the keypress
description: Metastate for the keypress. See [Key Event](http://developer.android.com/reference/android/view/KeyEvent.html).
- name: flags
type: number
description: Flags for the keypress. See [Key Event](http://developer.android.com/reference/android/view/KeyEvent.html).
# 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#L328
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L328
@@ -6,6 +6,9 @@ example_usage:
javascript_wd:
|
await driver.gsmCall('555-123-4567', 'Phone');
ruby:
|
@driver.gsm_call(phone_number: '555-123-4567', action: :call)
php:
|
// TODO
@@ -15,6 +18,7 @@ example_usage:
client_docs:
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L3183"
ruby: "http://www.rubydoc.info/github/appium/ruby_lib_core/master/Appium/Android/Device/Emulator#gsm_call-instance_method"
php: "https://github.com/appium/php-client/" # TODO
csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO
@@ -33,7 +37,7 @@ driver_support:
client_support:
java: false
python: false
ruby: false
ruby: true
php: false
csharp: false
javascript_wd: true
@@ -56,4 +60,4 @@ endpoint:
# 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#L340
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L340
@@ -6,6 +6,9 @@ example_usage:
javascript_wd:
|
await driver.gsmSignal(3);
ruby:
|
@driver.gsm_signal :good
php:
|
// TODO
@@ -15,6 +18,7 @@ example_usage:
client_docs:
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L3221"
ruby: "http://www.rubydoc.info/github/appium/ruby_lib_core/master/Appium/Android/Device/Emulator#gsm_signal-instance_method"
php: "https://github.com/appium/php-client/" # TODO
csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO
@@ -33,7 +37,7 @@ driver_support:
client_support:
java: false
python: false
ruby: false
ruby: true
php: false
csharp: false
javascript_wd: true
@@ -53,4 +57,4 @@ endpoint:
# 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#L343
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L343
@@ -6,6 +6,9 @@ example_usage:
javascript_wd:
|
await driver.gsmVoice('Voice state');
ruby:
|
@driver.gsm_voice :home
php:
|
// TODO
@@ -15,6 +18,7 @@ example_usage:
client_docs:
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L3241"
ruby: "https://www.rubydoc.info/github/appium/ruby_lib_core/master/Appium/Android/Device/Emulator#gsm_voice-instance_method"
php: "https://github.com/appium/php-client/" # TODO
csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO
@@ -33,7 +37,7 @@ driver_support:
client_support:
java: false
python: false
ruby: false
ruby: true
php: false
csharp: false
javascript_wd: true
@@ -53,4 +57,4 @@ endpoint:
# 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#L346
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L346
@@ -8,7 +8,7 @@ example_usage:
await driver.sendSms('555-123-4567', 'Hey lol');
ruby:
|
// TODO
@driver.send_sms(phone_number: '555-123-4567', message: 'Hey lol')
php:
|
// TODO
@@ -18,6 +18,7 @@ example_usage:
client_docs:
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L3183"
ruby: "http://www.rubydoc.info/github/appium/ruby_lib_core/master/Appium/Android/Device/Emulator#send_sms-instance_method"
php: "https://github.com/appium/php-client/" # TODO
csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO
@@ -36,7 +37,7 @@ driver_support:
client_support:
java: false
python: false
ruby: false
ruby: true
php: false
csharp: false
javascript_wd: true
@@ -59,4 +60,4 @@ endpoint:
# 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#L337
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L337
@@ -57,4 +57,4 @@ endpoint:
# 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#L396
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L396
@@ -9,6 +9,9 @@ example_usage:
javascript_wdio:
|
driver.toggleData();
ruby:
|
@driver.toggle_data
php:
|
// TODO
@@ -19,6 +22,7 @@ example_usage:
client_docs:
javascript_wdio: "http://webdriver.io/api/mobile/toggleData.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2771"
ruby: "https://www.rubydoc.info/github/appium/ruby_lib_core/master/Appium/Core/Device#toggle_data-instance_method"
php: "https://github.com/appium/php-client/" # TODO
csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO
@@ -53,4 +57,4 @@ endpoint:
# 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#L399
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L399
@@ -15,6 +15,9 @@ example_usage:
javascript_wdio:
|
driver.toggleLocationServices();
ruby:
|
@driver.toggle_location_services
php:
|
// TODO
@@ -27,6 +30,7 @@ client_docs:
python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L774"
javascript_wdio: "http://webdriver.io/api/mobile/toggleLocationServices.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2758"
ruby: "http://www.rubydoc.info/github/appium/ruby_lib_core/master/Appium/Core/Device#toggle_location_services-instance_method"
php: "https://github.com/appium/php-client/" # TODO
csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO
@@ -45,7 +49,7 @@ driver_support:
client_support:
java: true
python: true
ruby: false
ruby: true
php: true
csharp: true
javascript_wd: true
@@ -61,4 +65,4 @@ endpoint:
# 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#L405
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L405
@@ -9,6 +9,9 @@ example_usage:
javascript_wdio:
|
driver.toggleWiFi();
ruby:
|
@driver.toggle_wifi
php:
|
// TODO
@@ -19,6 +22,7 @@ example_usage:
client_docs:
javascript_wdio: "http://webdriver.io/api/mobile/toggleWiFi.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2738"
ruby: "http://www.rubydoc.info/github/appium/ruby_lib_core/master/Appium/Core/Device#toggle_wifi-instance_method"
php: "https://github.com/appium/php-client/" # TODO
csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO
@@ -53,4 +57,4 @@ endpoint:
# 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#L402
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L402
@@ -67,4 +67,4 @@ endpoint:
# 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#L325
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L325
@@ -57,4 +57,4 @@ endpoint:
# 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#L322
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L322
@@ -77,4 +77,4 @@ endpoint:
# 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#L427
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L427
@@ -85,7 +85,7 @@ endpoint:
# 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#L424
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L424
links:
- name: Appium Docs
@@ -65,4 +65,4 @@ endpoint:
# 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#L408
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L408
@@ -56,4 +56,4 @@ endpoint:
# 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#L418
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L418
@@ -68,4 +68,4 @@ endpoint:
# 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#L304
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L304
@@ -71,4 +71,4 @@ endpoint:
# 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#L285
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L285
@@ -76,4 +76,4 @@ endpoint:
# 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#L451
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L451
@@ -17,7 +17,7 @@ example_usage:
javascript_wd:
|
let element = await driver.elementByAccessibilityId("SomeAccessibilityID");
await element.submit();
await element.text();
javascript_wdio:
|
driver.getText("~SomeAccessibilityId");
@@ -1,7 +1,7 @@
---
name: Double Tap
short_description: Double tap on the touch screen using finger motion events
example_usage:
java:
|
@@ -10,7 +10,9 @@ example_usage:
action.perform();
python:
|
actions = TouchActions(driver)
from appium.webdriver.common.touch_action import TouchAction
# ...
actions = TouchAction(driver)
actions.double_tap(element)
actions.perform()
javascript_wd:
@@ -21,8 +23,7 @@ example_usage:
// Using touch actions
let action = new wd.TouchAction();
action.tap({el: element});
action.perform();
await driver.performTouchAction(action);
await action.perform();
ruby:
|
@driver.touch_action.double_tap(element).perform
@@ -61,7 +62,7 @@ client_support:
csharp: true
javascript_wd: true
javascript_wdio: true
# Information about the HTTP endpoints
endpoint:
@@ -1,7 +1,7 @@
---
name: Tap
short_description: Flick on the touch screen using finger motion events
example_usage:
java:
|
@@ -10,13 +10,14 @@ example_usage:
action.perform();
python:
|
actions = TouchActions(driver)
from appium.webdriver.common.touch_action import TouchAction
# ...
actions = TouchAction(driver)
actions.flick_element(element, 1, 10, 10)
actions.perform()
javascript_wd:
|
await element.flick(1, 10, 10);
javascript_wdio:
|
driver.touchFlick('<ELEMENT_ID>', 1, 10, 10);
@@ -59,7 +60,7 @@ client_support:
csharp: true
javascript_wd: true
javascript_wdio: true
# Information about the HTTP endpoints
endpoint:
@@ -81,7 +82,7 @@ endpoint:
- name: speed
type: number
description: The speed in pixels per seconds
# Links to specifications. Should link to at least one specification
specifications:
@@ -1,7 +1,7 @@
---
name: Long Tap
short_description: Long press on the touch screen using finger motion events
example_usage:
java:
|
@@ -10,7 +10,9 @@ example_usage:
action.perform();
python:
|
actions = TouchActions(driver)
from appium.webdriver.common.touch_action import TouchAction
# ...
actions = TouchAction(driver)
actions.long_press(element)
actions.perform()
javascript_wd:
@@ -18,9 +20,7 @@ example_usage:
// Using touch actions
let action = new wd.TouchAction();
action.longPress({el: element});
action.perform();
await driver.performTouchAction(action);
await action.perform();
javascript_wdio:
|
driver.touchPerform({
@@ -68,7 +68,7 @@ client_support:
csharp: true
javascript_wd: true
javascript_wdio: true
# Information about the HTTP endpoints
endpoint:
@@ -1,7 +1,9 @@
---
name: Tap
name: Move
short_description: Finger move on the screen
description:
>
As of Appium 1.8.0 all move actions take coordinates that are absolute.
example_usage:
java:
|
@@ -11,22 +13,19 @@ example_usage:
action.perform();
python:
|
actions = TouchActions(driver)
from appium.webdriver.common.touch_action import TouchAction
# ...
actions = TouchAction(driver)
actions.tap_and_hold(element)
actions.move(50, 50)
actions.perform()
javascript_wd:
|
// Using tapElement method
await driver.tapElement(elementOne);
// Using touch actions
let action = new wd.TouchAction();
action.press({x: 10, y: 10});
action.moveTo({x: 50, y: 50});
action.perform();
await driver.performTouchAction(action);
action.press({x: 10, y: 10})
.moveTo({x: 50, y: 50})
.release();
await action.perform();
javascript_wdio:
|
driver.touchMultiPerform([
@@ -73,7 +72,7 @@ client_support:
csharp: true
javascript_wd: true
javascript_wdio: true
# Information about the HTTP endpoints
endpoint:
@@ -1,15 +1,15 @@
---
name: Multi Touch Perform
short_description: Perform a multi touch action sequence
example_usage:
java:
|
TouchAction actionOne = new TouchAction();
TouchActions actionOne = new TouchAction();
actionOne.press(10, 10);
actionOne.moveTo(10, 100);
actionOne.release();
TouchAction actionTwo = new TouchAction();
TouchActions actionTwo = new TouchAction();
actionTwo.press(20, 20);
actionTwo.moveTo(20, 200);
actionTwo.release();
@@ -26,7 +26,7 @@ example_usage:
a1.press(10, 20)
a1.move_to(10, 200)
a1.release()
a2 = TouchAction()
a2.press(10, 10)
a2.move_to(10, 100)
@@ -41,8 +41,7 @@ example_usage:
action.press({x: 10, y: 10});
action.moveTo({x: 10, y: 100});
action.release();
await driver.performMultiTouchAction(action);
await action.perform();
javascript_wdio:
|
driver.touchMultiPerform([
@@ -89,7 +88,7 @@ client_support:
csharp: true
javascript_wd: true
javascript_wdio: true
# Information about the HTTP endpoints
endpoint:
@@ -120,4 +119,4 @@ endpoint:
# 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#L295
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L295
@@ -1,7 +1,7 @@
---
name: Scroll
short_description: Scroll on the touch screen using finger based motion events
example_usage:
java:
|
@@ -10,14 +10,15 @@ example_usage:
action.perform();
python:
|
actions = TouchActions(driver)
from appium.webdriver.common.touch_action import TouchAction
# ...
actions = TouchAction(driver)
actions.scroll_from_element(element, 10, 100)
actions.scroll(10, 100)
actions.perform()
javascript_wd:
|
await driver.scroll(10, 100);
javascript_wdio:
|
driver.touchScroll({
@@ -64,7 +65,7 @@ client_support:
csharp: true
javascript_wd: true
javascript_wdio: true
# Information about the HTTP endpoints
endpoint:
@@ -1,7 +1,7 @@
---
name: Tap
short_description: Single tap on the touch enabled device
example_usage:
java:
|
@@ -10,7 +10,9 @@ example_usage:
action.perform();
python:
|
actions = TouchActions(driver)
from appium.webdriver.common.touch_action import TouchAction
# ...
actions = TouchAction(driver)
actions.tap(element)
actions.perform()
javascript_wd:
@@ -21,9 +23,7 @@ example_usage:
// Using touch actions
let action = new wd.TouchAction();
action.tap({el: element});
action.perform();
await driver.performTouchAction(action);
await action.perform();
javascript_wdio:
|
driver.touchPerform({
@@ -71,7 +71,7 @@ client_support:
csharp: true
javascript_wd: true
javascript_wdio: true
# Information about the HTTP endpoints
endpoint:
@@ -1,7 +1,7 @@
---
name: Touch Down
short_description: Finger down on the screen
example_usage:
java:
|
@@ -11,7 +11,9 @@ example_usage:
action.perform();
python:
|
actions = TouchActions(driver)
from appium.webdriver.common.touch_action import TouchAction
# ...
actions = TouchAction(driver)
actions.tap_and_hold(element)
actions.move(50, 50)
actions.perform()
@@ -24,9 +26,7 @@ example_usage:
let action = new wd.TouchAction();
action.press({x: 10, y: 10});
action.moveTo({x: 50, y: 50});
action.perform();
await driver.performTouchAction(action);
await action.perform();
javascript_wdio:
|
driver.touchMultiPerform([
@@ -73,7 +73,7 @@ client_support:
csharp: true
javascript_wd: true
javascript_wdio: true
# Information about the HTTP endpoints
endpoint:
@@ -1,13 +1,13 @@
---
name: Touch Perform
short_description: Perform a touch action sequence
description:
|
This functionality is only available from within a native context
'Touch Perform' works similarly to the other singular touch interactions, except that this allows you to chain together more than one touch action as one
command. This is useful because Appium commands are sent over the network and there's latency between commands. This latency can make certain touch
command. This is useful because Appium commands are sent over the network and there's latency between commands. This latency can make certain touch
interactions impossible because some interactions need to be performed in one sequence. Vertical, for example, requires pressing down, moving to a different
y coordinate, and then releasing. For it to work, there can't be a delay between the interactions.
@@ -22,7 +22,7 @@ example_usage:
python:
|
from appium.webdriver.common.touch_action import TouchAction
// ...
actions = TouchAction(driver)
actions.tap_and_hold(20, 20)
actions.move_to(10, 100)
@@ -34,9 +34,7 @@ example_usage:
action.press({x: 10, y: 10});
action.moveTo({x: 10, y: 100});
action.release();
action.perform();
await driver.performTouchAction(action);
await action.perform();
javascript_wdio:
|
driver.touchPerform([
@@ -83,7 +81,7 @@ client_support:
csharp: true
javascript_wd: true
javascript_wdio: true
# Information about the HTTP endpoints
endpoint:
@@ -114,4 +112,4 @@ endpoint:
# 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#L292
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L292
@@ -1,7 +1,7 @@
---
name: Touch Up
short_description: Finger up on the screen
example_usage:
java:
|
@@ -11,7 +11,9 @@ example_usage:
action.perform();
python:
|
actions = TouchActions(driver)
from appium.webdriver.common.touch_action import TouchAction
# ...
actions = TouchAction(driver)
actions.tap_and_hold(20, 20)
actions.release(50, 50)
actions.perform()
@@ -24,9 +26,7 @@ example_usage:
let action = new wd.TouchAction();
action.press({x: 10, y: 10});
action.release({x: 20, y: 20});
action.perform();
await driver.performTouchAction(action);
await action.perform();
javascript_wdio:
|
driver.touchMultiPerform([
@@ -73,7 +73,7 @@ client_support:
csharp: true
javascript_wd: true
javascript_wdio: true
# Information about the HTTP endpoints
endpoint:
+140
View File
@@ -0,0 +1,140 @@
---
name: Execute Mobile Command
short_description: Execute a native mobile command
description:
|
Execute a variety of native, mobile commands that aren't associated with a specific endpoint
Syntax is `execute("mobile: <commandName>", <JSON serializable argument>)`
List of available commands:
### IOS
| Command | Description | Argument | Argument Example |
| ------- | ----------- | -------- | ---------------- |
| mobile:viewportScreenshot | Like [screenshot](/docs/en/commands/session/screenshot.md) but only includes contents of viewport | <none> | <none> |
### IOS (XCUITest Only)
| Command | Description | Argument | Argument Example |
| ------- | ----------- | -------- | ---------------- |
| mobile:startPerfRecord | Starts performance profiling for the device under test | <none> | |
| mobile:stopPerfRecord | Stops performance profiling for the device under test | <none> | |
| mobile:startLogsBroadcast | Starts iOS system logs broadcast websocket on the same host and port where Appium server is running at `/ws/session/:sessionId:/appium/syslog` endpoint. | <none> | |
| mobile:stopLogsBroadcast | Stops the iOS system logs broadcasting websocket server started by `mobile:startLogsBroadcast` | <none> | |
| mobile:swipe | refer to [Automating Mobile Gestures For iOS With WebDriverAgent/XCTest Backend](/docs/en/writing-running-appium/ios/ios-xctest-mobile-gestures.md#mobile-swipe) | | |
| mobile:scroll | refer to [Automating Mobile Gestures For iOS With WebDriverAgent/XCTest Backend](/docs/en/writing-running-appium/ios/ios-xctest-mobile-gestures.md#mobile-scroll) | | |
| mobile:pinch | refer to [Automating Mobile Gestures For iOS With WebDriverAgent/XCTest Backend](/docs/en/writing-running-appium/ios/ios-xctest-mobile-gestures.md#mobile-pinch) | | |
| mobile:doubleTap | refer to [Automating Mobile Gestures For iOS With WebDriverAgent/XCTest Backend](/docs/en/writing-running-appium/ios/ios-xctest-mobile-gestures.md#mobile-doubleTap) | | |
| mobile:touchAndHold | refer to [Automating Mobile Gestures For iOS With WebDriverAgent/XCTest Backend](/docs/en/writing-running-appium/ios/ios-xctest-mobile-gestures.md#mobile-touchAndHold) | | |
| mobile:twoFingerTap | refer to [Automating Mobile Gestures For iOS With WebDriverAgent/XCTest Backend](/docs/en/writing-running-appium/ios/ios-xctest-mobile-gestures.md#mobile-twoFingerTap) | | |
| mobile:tap | refer to [Automating Mobile Gestures For iOS With WebDriverAgent/XCTest Backend](/docs/en/writing-running-appium/ios/ios-xctest-mobile-gestures.md#mobile-tap) | | |
| mobile:dragFromToForDuration | refer to [Automating Mobile Gestures For iOS With WebDriverAgent/XCTest Backend](/docs/en/writing-running-appium/ios/ios-xctest-mobile-gestures.md#mobile-dragFromToForDuration) | | |
| mobile:selectPickerWheelValue | refer to [Automating Mobile Gestures For iOS With WebDriverAgent/XCTest Backend](/docs/en/writing-running-appium/ios/ios-xctest-mobile-gestures.md#mobile-selectPickerWheelValue) | | |
| mobile:alert | refer to [Automating Mobile Gestures For iOS With WebDriverAgent/XCTest Backend](/docs/en/writing-running-appium/ios/ios-xctest-mobile-gestures.md#mobile-alert) | | |
| mobile:installApp | refer to [XCUITest Mobile App Managemenet](/docs/en/writing-running-appium/ios/ios-xctest-mobile-apps-management.md#mobile-installapp) | | |
| mobile:removeApp | refer to [XCUITest Mobile App Managemenet](/docs/en/writing-running-appium/ios/ios-xctest-mobile-apps-management.md#mobile-removeapp) | | |
| mobile:isAppInstalled | refer to [XCUITest Mobile App Managemenet](/docs/en/writing-running-appium/ios/ios-xctest-mobile-apps-management.md#mobile-isappinstalled) | | |
| mobile:launchApp | refer to [XCUITest Mobile App Managemenet](/docs/en/writing-running-appium/ios/ios-xctest-mobile-apps-management.md#mobile-launchapp) | | |
| mobile:terminateApp | refer to [XCUITest Mobile App Managemenet](/docs/en/writing-running-appium/ios/ios-xctest-mobile-apps-management.md#mobile-terminateapp) | | |
| mobile:activateApp | refer to [XCUITest Mobile App Managemenet](/docs/en/writing-running-appium/ios/ios-xctest-mobile-apps-management.md#mobile-activateapp) | | |
| mobile:queryAppState | refer to [XCUITest Mobile App Managemenet](/docs/en/writing-running-appium/ios/ios-xctest-mobile-apps-management.md#mobile-queryappstate) | | |
| 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) | | |
### Android
| Command | Description | Argument | Argument Example |
| ------- | ----------- | -------- | ---------------- |
| mobile:shell | Execute [ADB shell](https://developer.android.com/studio/command-line/adb#shellcommands) commands (requires [server flag](/docs/en/writing-running-appium/server-args.md#server-flags) `--relaxed-security` to be set) | ADB shell string | `am start -n com.example.demo/com.example.test.MainActivity` |
| mobile:startLogsBroadcast | Starts Android logcat broadcast websocket on the same host and port where Appium is running at `/ws/session/:sessionId:/appium/logcat` endpoint | <none> | <none> |
| mobile:stopLogsBroadcast | Stops the logcat broadcasting websocket server started by `mobile:startLogsBroadcast` | <none> | <none> |
| mobile:batteryInfo | Reads the battery information from the device under test | <none> | <none> |
| mobile:acceptAlert | Accepts an on-screen alert | Optional button label to click on | <none> |
| mobile:dismissAlert | Dismisses an on-screen alert | Optional button label to click on | <none> |
### Android (UiAutomator2 only)
| Command | Description | Argument | Argument Example |
| ------- | ----------- | -------- | ---------------- |
| mobile:scrollBackTo | Scroll from one element to another | `{elementId, elementToId}` | `{elementId: 2, elementToId: 1}` |
| mobile:viewportScreenshot | Like [screenshot](/commands/session/screenshot/) but only includes contents of viewport | <none> | <none> |
| mobile:deepLink | Opens a deep-link URL for testing [Instant Apps](https://support.google.com/googleplay/answer/7240211?hl=en) | `{url, package}` | `{url: "https://www.site.com/", package: "com.site.SomeAndroidPackage"}` |
example_usage:
java:
|
driver.executeScript("mobile: scroll", ImmutableMap.of("direction", "down"));;
python:
|
self.driver.execute_script("mobile: scroll", {'direction': 'down'})
javascript_wd:
|
await driver.execute('mobile: scroll', {direction: 'down'});
javascript_wdio:
|
var result = browser.execute('mobile: scroll', {direction: 'down'})
ruby:
|
@driver.execute_script("mobile: scroll", { "direction" => "down"})
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/remote/RemoteWebDriver.html#executeScript-java.lang.String-java.lang.Object...-"
python: "http://selenium-python.readthedocs.io/api.html#selenium.webdriver.remote.webdriver.WebDriver.execute_script"
javascript_wdio: "http://webdriver.io/api/protocol/execute.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L102"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Driver:execute_script"
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: true
windows:
windows: true
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: /wd/hub/session/:session_id/execute
method: GET
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: script
type: string
description: The mobile command to execute
- name: args
type: array
description: The JSON serializable arguments
response:
- type: any
description: The command result
# Links to specifications. Should link to at least one specification
specifications:
w3c: https://www.w3.org/TR/webdriver/#dfn-execute-script
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidexecute
@@ -57,4 +57,4 @@ endpoint:
# 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#L454
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L454
@@ -57,4 +57,4 @@ endpoint:
# 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#L454
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L454
+3 -4
View File
@@ -8,8 +8,8 @@ description:
This method is useful for inspecting your application hierarchy and using that to write [selectors](/docs/en/commands/element/find-element.md)
(NOTE: iOS and Android don't have standard ways of defining their application source, so on calls to 'Get Page Source' Appium traverses the app hierarchy
and creates an XML document. Thus, getting the source can oftentime be an expensive and time-consuming operation)
(NOTE: iOS and Android don't have standard ways of defining their application source, so on calls to 'Get Page Source' Appium traverses the app hierarchy
and creates an XML document. Thus, getting the source can often be an expensive and time-consuming operation)
example_usage:
java:
@@ -63,7 +63,6 @@ client_support:
csharp: true
javascript_wd: true
javascript_wdio: true
# Information about the HTTP endpoints
endpoint:
@@ -77,6 +76,6 @@ endpoint:
description: The sources of current context.
# Links to specifications. Should link to at least one specification
specifications:
specifications:
w3c: https://www.w3.org/TR/webdriver/#dfn-get-page-source
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidsource
+54 -11
View File
@@ -1,4 +1,3 @@
/* eslint-disable no-console */
import path from 'path';
import yaml from 'yaml-js';
import { fs, mkdirp } from 'appium-support';
@@ -9,6 +8,8 @@ import _ from 'lodash';
import { asyncify } from 'asyncbox';
import validator from './validator';
import url from 'url';
import log from 'fancy-log';
import { exec } from 'teen_process';
// What range of platforms do the driver's support
@@ -74,7 +75,7 @@ Handlebars.registerHelper('versions', (object, name, driverName) => {
Handlebars.registerHelper('hyphenate', (str) => str.replace('_', '-'));
Handlebars.registerHelper('uppercase', (str) => str.toUpperCase());
Handlebars.registerHelper('capitalize', (driverName) => {
Handlebars.registerHelper('capitalize', function (driverName) {
switch (driverName.toLowerCase()) {
case 'xcuitest':
return 'XCUITest';
@@ -102,13 +103,55 @@ Handlebars.registerHelper('base_url', function (fullUrl) {
return baseUrl.hostname;
});
async function registerSpecUrlHelper () {
const npmRoot = (await exec('npm', ['root'])).stdout.trim();
const routesFile = await fs.readFile(path.resolve(npmRoot, 'appium-base-driver', 'lib', 'protocol', 'routes.js'), 'utf8');
const routesFileLines = routesFile.split('\n');
Handlebars.registerHelper('spec_url', function (specUrl, endpoint) {
// return the url if it is not a link to our routes doc
if (!specUrl.includes('routes.js')) {
return specUrl;
}
// make sure it is a full url
if (specUrl.startsWith('routes.js')) {
specUrl = `https://github.com/appium/appium-base-driver/blob/master/lib/protocol/${specUrl}`;
}
// strip off any line numbers
specUrl = specUrl.split('#L')[0];
// the endpoint here is often `session_id` and we need `sessionId`
endpoint = endpoint.replace('session_id', 'sessionId');
// and `element_id` and we need `elementId`
endpoint = endpoint.replace('element_id', 'elementId');
// find the line number for this endpoint
let index;
for (const i in routesFileLines) {
if (routesFileLines[i].includes(endpoint)) {
// line numbers are 1-indexed
index = parseInt(i, 10) + 1;
break;
}
}
if (_.isUndefined(index)) {
throw new Error(`Unable to find entry in 'appium-base-driver#routes' for endpoint '${endpoint}'`);
}
return `${specUrl}#L${index}`;
});
}
async function generateCommands () {
await registerSpecUrlHelper();
const commands = path.resolve(__dirname, 'commands/**/*.yml');
console.log('Traversing YML files', commands);
log('Traversing YML files', commands);
await fs.rimraf(path.resolve(__dirname, '..', 'docs', 'en', 'commands'));
let fileCount = 0;
for (let filename of await fs.glob(commands)) {
console.log('Rendering file:', filename, path.relative(__dirname, filename), path.extname(filename));
log(`Rendering file: ${filename} ${path.relative(__dirname, filename)}`);
// Translate the YML specs to JS
const inputYML = await fs.readFile(filename, 'utf8');
@@ -125,18 +168,18 @@ async function generateCommands () {
// Write the markdown to its right place
const markdownPath = replaceExt(path.relative(__dirname, filename), '.md');
const outfile = path.resolve(__dirname, '..', 'docs', 'en', markdownPath);
console.log('Writing file to:', outfile);
log(` Writing to: ${outfile}`);
await mkdirp(path.dirname(outfile));
await fs.writeFile(outfile, markdown, 'utf8');
fileCount++;
}
console.log(`Done writing ${fileCount} command documents`);
log(`Done writing ${fileCount} command documents`);
}
async function generateCommandIndex () {
const apiIndex = path.resolve(__dirname, '..', 'docs', 'en', 'about-appium', 'api.md');
console.log(`Creating API index '${apiIndex}'`);
log(`Creating API index '${apiIndex}'`);
function getTree (element, path) {
let node = {
@@ -163,10 +206,10 @@ async function generateCommandIndex () {
commands.push(getTree(el, '/docs/en/commands'));
}
const template = Handlebars.compile(await fs.readFile(path.resolve(__dirname, 'api-template.md'), 'utf8'), {noEscape: true, strict: true});
const markdown = template({commands});
await fs.writeFile(apiIndex, markdown, 'utf8');
console.log(`Done writing API index`);
const commandTemplate = Handlebars.compile(await fs.readFile(path.resolve(__dirname, 'api-template.md'), 'utf8'), {noEscape: true, strict: true});
const commandMarkdown = commandTemplate({commands});
await fs.writeFile(apiIndex, commandMarkdown, 'utf8');
log(`Done writing API index`);
}
async function main () {
+2 -2
View File
@@ -161,10 +161,10 @@ null
## See Also
{{#if specifications.w3c}}
* [W3C Specification]({{specifications.w3c}})
* [W3C Specification]({{spec_url specifications.w3c endpoint.url}})
{{/if}}
{{#if specifications.jsonwp}}
* [JSONWP Specification]({{specifications.jsonwp}})
* [JSONWP Specification]({{spec_url specifications.jsonwp endpoint.url}})
{{/if}}
{{#each links}}
* [{{this.name}}]({{this.url}})
@@ -2,7 +2,7 @@
你想从源码运行Appium并帮助修复BUG和添加功能吗?
真棒!只需要fork工程,添加一个修改,然后发送pull请求即可!
在开始之前请阅读我们的代码风格指南([Style Guide](style-guide-2.0.md)。
在开始之前请阅读我们的代码风格指南([Style Guide](style-guide.md)。
在发送pull请求前请确保通过单元和功能测试;关于如何运行测试等更多信息,请继续阅读!
首先,确保你阅读README文件且按照设置说明走。
@@ -63,7 +63,7 @@ node.js的原生支持,Appium代码是_被移植_到ES5(JS更为广泛支持
### 排查和代码风格
对于所有Appium的JS而言,代码外观和使用感觉同样重要。这包括样式常规,编码模式以及我们解决各种问题时使用的
库。你应该熟悉我们新的[ES2015 风格指南](/docs/cn/contributing-to-appium/style-guide-2.0.md)。
库。你应该熟悉我们新的[ES2015 风格指南](/docs/cn/contributing-to-appium/style-guide.md)。
当转化时,Appium包将自动运行JSHint或其他lint工具,并在代码不符合我们规范的时候提供警告或错误反馈。
这些工具不一定能顾全我们关心的种种风格问题,所以我们在review代码的时候也应该注意代码规范问题。这不是
吹毛求疵,而是为了有一个整洁,一致并且可读的代码库。
@@ -102,7 +102,7 @@ _FORCE_LOGS=1 <command> # 显示测试运行期间的模块日志输出
任何非Appium主包的发布流程都是非常简洁明了的(请注意:如果你想要发布它,你需要成为一个NPM的所有者。
所有权由Appium提交者管理; 如果你对所有者有任何疑问,请联系@jlipps 或者 @imurchie)。
0. `rm -rf node_modules && npm install` 并运行测试以确保全新安装正常工作
0. `rm -rf node_modules && rm -rf package-lock.json && npm install` 并运行测试以确保全新安装正常工作
0. 根据[SemVer](http://semver.org/) 规则决定我们是否需要发布一个补丁(漏洞修复),微调(功能)或者是主要(迭代)(请参考 [how SemVer works with NPM](https://docs.npmjs.com/getting-started/semantic-versioning).
0. 通过任何适当的更改和提交来更新CHANGELOG以README文件。大多数子包没有CHANGELOG。
0. 通过适当的版本类型运行 `npm version <version-type>`
@@ -121,8 +121,8 @@ _FORCE_LOGS=1 <command> # 显示测试运行期间的模块日志输出
因此有必要在发布过程中手动管理它。 它需要与对`package.json`的更改一起提交到GitHub。
0. 如果 NPM shrinkwrap JSON 文件存在,请移除.
0. `rm -rf node_modules && npm install` 并运行测试以确保全新安装正常工作
0. `rm -rf node_modules && npm install --production` 以获取仅production部分.
0. `rm -rf node_modules && rm -rf package-lock.json && npm install` 并运行测试以确保全新安装正常工作
0. `rm -rf node_modules && rm -rf package-lock.json && npm install --production` 以获取仅production部分.
0. `npm shrinkwrap` 来编写新的 NPM shrinkwrap JSON 文件.
0. 根据SemVer来决定我们是否需要发布一个补丁(漏洞修复),微调(功能)或者是主要(迭代)
0. 用合适的新版本信息来更新`package.json`
+3
View File
@@ -22,6 +22,9 @@
<li>
<a href='/docs/en/commands/session/screenshot.md'>Screenshot</a>
</li>
<li>
<a href='/docs/en/commands/session/source.md'>Source</a>
</li>
<li>
Timeouts<ul> <li>
<a href='/docs/en/commands/session/timeouts/timeouts.md'>Timeouts</a>
+3 -4
View File
@@ -6,10 +6,9 @@ applications on iOS mobile, Android mobile, and Windows desktop platforms.
**Mobile web apps** are web apps accessed using a mobile browser (Appium
supports Safari on iOS and Chrome or the built-in 'Browser' app on Android).
**Hybrid apps** have a wrapper around a "webview" -- a native control that
enables interaction with web content. Projects like
[Phonegap](http://phonegap.com/), make it easy to build apps using web
technologies that are then bundled into a native wrapper, creating a hybrid
app.
enables interaction with web content. Projects like [Apache Cordova](https://cordova.apache.org)
or [Phonegap](http://phonegap.com/) make it easy to build apps using web
technologies that are then bundled into a native wrapper, creating a hybrid app.
Importantly, Appium is "cross-platform": it allows you to write tests against
multiple platforms (iOS, Android, Windows), using the same API. This enables
+1
View File
@@ -47,6 +47,7 @@ you will see your device on the grid console page:
"registerCycle": 5000,
"hubPort": <grid_port>,
"hubHost": "<Grid_host_name_or_grid_ip-address>"
"hubProtocol": "<Protocol_of_Grid_defaults_to_http>"
}
}
```
@@ -23,7 +23,7 @@ This locator strategy was specifically built on UIAutomation, so it is not inclu
### `xpath` locator strategy
1. Try not to use XPath locators unless there is absolutely no other alternatives. In general, xpath locators might be times slower, than other types of locators like accessibility id, class name and predicate (up to 100 times slower in some special cases). They are so slow, because xpath location is not natively supported by Apple's XCTest framework.
1. Try not to use XPath locators unless there is absolutely no other alternative. In general, xpath locators might be many times slower than other types of locators like accessibility id, class name and predicate (up to 100 times slower in some special cases). They are so slow, because xpath location is not natively supported by Apple's XCTest framework.
2. Use
```
+1
View File
@@ -43,6 +43,7 @@ Note that the actual commands you would use in your test script differ based on
|----|----|----|
|`ignoreUnimportantViews`|Boolean which sets whether Android devices should use `setCompressedLayoutHeirarchy()` which ignores all views which are marked IMPORTANT_FOR_ACCESSIBILITY_NO or IMPORTANT_FOR_ACCESSIBILITY_AUTO (and have been deemed not important by the system), in an attempt to make things less confusing or faster. `false` by default. | `false` or `true` |
|`allowInvisibleElements`|For UiAutomator2 Driver. Boolean which set whether Android device should show all elements, visible and invisible. `false` by default. | `false` or `true` |
|`enableNotificationListener`| For UiAutomator2 Driver. Boolean which sets whether the Android device should enable or disable the `NotificationListener`. `true` by default. | `false` or `true` |
#### Android UiAutomator Configurator
@@ -76,7 +76,7 @@ $activity = $driver->currentActivity();
### Endpoint
`GET /wd/hub/session/:session_id/device/current_activity`
`GET /wd/hub/session/:session_id/appium/device/current_activity`
### URL Parameters
@@ -94,4 +94,4 @@ Name of the current [activity](https://developer.android.com/reference/android/a
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/mjsonwp/routes.js#L366)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L395)
@@ -73,7 +73,7 @@ let package = await driver.getCurrentPackage();
### Endpoint
`GET /wd/hub/session/:session_id/device/current_package`
`GET /wd/hub/session/:session_id/appium/device/current_package`
### URL Parameters
@@ -91,4 +91,4 @@ Name of the current [package](https://developer.android.com/reference/java/lang/
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/mjsonwp/routes.js#L369)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L398)
@@ -80,7 +80,7 @@ $driver->startActivity(array('appPackage' => 'com.example',
### Endpoint
`POST /wd/hub/session/:session_id/device/start_activity`
`POST /wd/hub/session/:session_id/appium/device/start_activity`
### URL Parameters
@@ -107,4 +107,4 @@ null
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/mjsonwp/routes.js#L411)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L484)
@@ -112,4 +112,4 @@ null
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/mjsonwp/routes.js#L439)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L512)
+1 -1
View File
@@ -94,4 +94,4 @@ null
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/mjsonwp/routes.js#L433)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L506)
@@ -94,4 +94,4 @@ null
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/mjsonwp/routes.js#L442)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L515)
@@ -97,4 +97,4 @@ null
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/mjsonwp/routes.js#L445)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L518)
+2 -2
View File
@@ -80,7 +80,7 @@ iOS tests with XCUITest can also use the `mobile: installApp` method. See detail
### Endpoint
`POST /wd/hub/session/:session_id/device/install_app`
`POST /wd/hub/session/:session_id/appium/device/install_app`
### URL Parameters
@@ -100,4 +100,4 @@ null
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/mjsonwp/routes.js#L372)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L402)
@@ -80,7 +80,7 @@ iOS tests with XCUITest can also use the `mobile: isAppInstalled` method. See de
### Endpoint
`POST /wd/hub/session/:session_id/device/app_installed`
`POST /wd/hub/session/:session_id/appium/device/app_installed`
### URL Parameters
@@ -100,4 +100,4 @@ Return true if installed, false if not (`boolean`)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/mjsonwp/routes.js#L378)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L434)
+1 -1
View File
@@ -98,4 +98,4 @@ null
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/mjsonwp/routes.js#L430)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L503)
+2 -2
View File
@@ -80,7 +80,7 @@ iOS tests with XCUITest can also use the `mobile: removeApp` method. See detaile
### Endpoint
`POST /wd/hub/session/:session_id/device/remove_app`
`POST /wd/hub/session/:session_id/appium/device/remove_app`
### URL Parameters
@@ -101,4 +101,4 @@ null
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/mjsonwp/routes.js#L375)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L418)
+1 -1
View File
@@ -94,4 +94,4 @@ null
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/mjsonwp/routes.js#L436)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L509)
@@ -0,0 +1,104 @@
# Get Clipboard
Get the content of the system clipboard
## Example Usage
```java
// Java
driver.getClipboard(ClipboardContentType.PLAINTEXT); // To get plaintext
driver.getClipboardText();
```
```python
# Python
self.driver.get_clipboard()
self.driver.get_clipboard_text()
```
```javascript
// Javascript
// webdriver.io example
await driver.getClipboard();
// wd example
await driver.getClipboard();
```
```ruby
# Ruby
@driver.get_clipboard
```
```php
# PHP
// PHP Code here
```
```csharp
// C#
// CSharp Code here
```
## Description
Get the content of the system clipboard
## Support
### Appium Server
|Platform|Driver|Platform Versions|Appium Version|Driver Version|
|--------|----------------|------|--------------|--------------|
| iOS | [XCUITest](/docs/en/drivers/ios-xcuitest.md) | 9.3+ | 1.6.0+ | All |
| | [UIAutomation](/docs/en/drivers/ios-uiautomation.md) | None | None | None |
| Android | [UiAutomator2](/docs/en/drivers/android-uiautomator2.md) | ?+ | 1.6.0+ | All |
| | [UiAutomator](/docs/en/drivers/android-uiautomator.md) | None | None | None |
| Mac | [Mac](/docs/en/drivers/mac.md) | None | None | None |
| Windows | [Windows](/docs/en/drivers/windows.md) | None | None | None |
### Appium Clients
|Language|Support|Documentation|
|--------|-------|-------------|
|[Java](https://github.com/appium/java-client/releases/latest)| All | [seleniumhq.github.io](https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/WebElement.html#click--) |
|[Python](https://github.com/appium/python-client/releases/latest)| All | [github.com](https://github.com/appium/python-client) |
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | [webdriver.io](http://webdriver.io/index.html) |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/releases) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [github.com](https://github.com/appium/ruby_lib/releases/latest) |
|[PHP](https://github.com/appium/php-client/releases/latest)| None | [github.com](https://github.com/appium/php-client/releases/latest-) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| None | [github.com](https://github.com/appium/appium) |
## HTTP API Specifications
### Endpoint
`POST /wd/hub/session/:session_id/appium/device/get_clipboard`
### URL Parameters
|name|description|
|----|-----------|
|session_id|ID of the session to route the command to|
### JSON Parameters
|name|type|description|
|----|----|-----------|
| contentType | `string` | The type of the content to get. Plaintext, Image, URL. Android supports only plaintext. |
### Response
Clipboard content as base64-encoded string or an empty string if the clipboard is empty (`string`)
## See Also
@@ -0,0 +1,107 @@
# Set Clipboard
Set the content of the system clipboard
## Example Usage
```java
// Java
// base64Content is Base64-encoded content
driver.setClipboard("label", ClipboardContentType.PLAINTEXT, base64Content);
driver.setClipboardText("happy testing");
```
```python
# Python
self.driver.set_clipboard('happy testing')
self.driver.set_clipboard_text('happy testing')
```
```javascript
// Javascript
// webdriver.io example
await driver.setClipboard('happy testing', 'plaintext')
// wd example
await driver.setClipboard('happy testing', 'plaintext')
```
```ruby
# Ruby
@driver.set_clipboard content: 'happy testing'
```
```php
# PHP
// PHP Code here
```
```csharp
// C#
// CSharp Code here
```
## Description
Set the content of the system clipboard
## Support
### Appium Server
|Platform|Driver|Platform Versions|Appium Version|Driver Version|
|--------|----------------|------|--------------|--------------|
| iOS | [XCUITest](/docs/en/drivers/ios-xcuitest.md) | 9.3+ | 1.6.0+ | All |
| | [UIAutomation](/docs/en/drivers/ios-uiautomation.md) | None | None | None |
| Android | [UiAutomator2](/docs/en/drivers/android-uiautomator2.md) | ?+ | 1.6.0+ | All |
| | [UiAutomator](/docs/en/drivers/android-uiautomator.md) | None | None | None |
| Mac | [Mac](/docs/en/drivers/mac.md) | None | None | None |
| Windows | [Windows](/docs/en/drivers/windows.md) | None | None | None |
### Appium Clients
|Language|Support|Documentation|
|--------|-------|-------------|
|[Java](https://github.com/appium/java-client/releases/latest)| All | [seleniumhq.github.io](https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/WebElement.html#click--) |
|[Python](https://github.com/appium/python-client/releases/latest)| All | [github.com](https://github.com/appium/python-client) |
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | [webdriver.io](http://webdriver.io/index.html) |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/releases) |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [github.com](https://github.com/appium/ruby_lib/releases/latest) |
|[PHP](https://github.com/appium/php-client/releases/latest)| None | [github.com](https://github.com/appium/php-client/releases/latest-) |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| None | [github.com](https://github.com/appium/appium) |
## HTTP API Specifications
### Endpoint
`POST /wd/hub/session/:session_id/appium/device/set_clipboard`
### URL Parameters
|name|description|
|----|-----------|
|session_id|ID of the session to route the command to|
### JSON Parameters
|name|type|description|
|----|----|-----------|
| content | `String` | The actual base64 encoded clipboard content. |
| contentType | `string` | The type of the content to get. Plaintext, Image, URL. Android supports only plaintext. |
| label | `string` | Clipboard data label for Android. |
### Response
Response from Appium server (`string`)
## See Also
@@ -0,0 +1,93 @@
# Emulate power state
Emulate power state change on the connected emulator.
## Example Usage
```java
// Java
driver.setPowerAC(PowerACState.OFF);
```
```python
# Not supported
```
```javascript
// Not supported
// Not supported
```
```ruby
# Ruby
@driver.set_power_ac :on
```
```php
// Not supported
```
```csharp
// Not supported
```
## Description
For Android emulator.
To set the state of the battery charger to connected or not.
## Support
### Appium Server
|Platform|Driver|Platform Versions|Appium Version|Driver Version|
|--------|----------------|------|--------------|--------------|
| iOS | [XCUITest](/docs/en/drivers/ios-xcuitest.md) | None | None | None |
| | [UIAutomation](/docs/en/drivers/ios-uiautomation.md) | None | None | None |
| Android | [UiAutomator2](/docs/en/drivers/android-uiautomator2.md) | ?+ | 1.6.0+ | All |
| | [UiAutomator](/docs/en/drivers/android-uiautomator.md) | 4.2+ | All | All |
| Mac | [Mac](/docs/en/drivers/mac.md) | None | None | None |
| Windows | [Windows](/docs/en/drivers/windows.md) | None | None | None |
### Appium Clients
|Language|Support|Documentation|
|--------|-------|-------------|
|[Java](https://github.com/appium/java-client/releases/latest)| All | [appium.github.io](http://appium.github.io/java-client/) |
|[Python](https://github.com/appium/python-client/releases/latest)| None | |
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| None | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| None | |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/master/Appium/Android/Device/Emulator#set_power_ac-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| None | |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| None | |
## HTTP API Specifications
### Endpoint
`POST /session/:session_id/appium/device/power_ac`
### URL Parameters
|name|description|
|----|-----------|
|session_id|ID of the session to route the command to|
### JSON Parameters
|name|type|description|
|----|----|-----------|
| state | `string` | set the state. on or off |
### Response
null
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L381)
@@ -0,0 +1,93 @@
# Emulate power capacity
Emulate power capacity change on the connected emulator.
## Example Usage
```java
// Java
driver.setPowerCapacity(100);
```
```python
# Not supported
```
```javascript
// Not supported
// Not supported
```
```ruby
# Ruby
@driver.set_power_capacity 50
```
```php
// Not supported
```
```csharp
// Not supported
```
## Description
For Android emulator.
To set the battery percentage.
## Support
### Appium Server
|Platform|Driver|Platform Versions|Appium Version|Driver Version|
|--------|----------------|------|--------------|--------------|
| iOS | [XCUITest](/docs/en/drivers/ios-xcuitest.md) | None | None | None |
| | [UIAutomation](/docs/en/drivers/ios-uiautomation.md) | None | None | None |
| Android | [UiAutomator2](/docs/en/drivers/android-uiautomator2.md) | ?+ | 1.6.0+ | All |
| | [UiAutomator](/docs/en/drivers/android-uiautomator.md) | 4.2+ | All | All |
| Mac | [Mac](/docs/en/drivers/mac.md) | None | None | None |
| Windows | [Windows](/docs/en/drivers/windows.md) | None | None | None |
### Appium Clients
|Language|Support|Documentation|
|--------|-------|-------------|
|[Java](https://github.com/appium/java-client/releases/latest)| All | [appium.github.io](http://appium.github.io/java-client/) |
|[Python](https://github.com/appium/python-client/releases/latest)| None | |
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| None | |
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| None | |
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [www.rubydoc.info](https://www.rubydoc.info/github/appium/ruby_lib_core/master/Appium/Android/Device/Emulator#set_power_capacity-instance_method) |
|[PHP](https://github.com/appium/php-client/releases/latest)| None | |
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| None | |
## HTTP API Specifications
### Endpoint
`POST /session/:session_id/appium/device/power_capacity`
### URL Parameters
|name|description|
|----|-----------|
|session_id|ID of the session to route the command to|
### JSON Parameters
|name|type|description|
|----|----|-----------|
| percent | `integer` | ercentage value in range [0, 100] |
### Response
null
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L378)
+1 -1
View File
@@ -96,4 +96,4 @@ Contents of file in base64 (`string`)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/mjsonwp/routes.js#L390)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L463)
+2 -2
View File
@@ -76,7 +76,7 @@ $folderBase64 = $driver->pullFolder($path);
### Endpoint
`POST /wd/hub/session/:session_id/device/pull_folder`
`POST /wd/hub/session/:session_id/appium/device/pull_folder`
### URL Parameters
@@ -96,4 +96,4 @@ A string of Base64 encoded data, representing a zip archive of the contents of t
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/mjsonwp/routes.js#L393)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L466)
+1 -1
View File
@@ -98,4 +98,4 @@ null
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/mjsonwp/routes.js#L387)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L460)
@@ -92,4 +92,4 @@ True if the device is locked, false if not (`boolean`)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/mjsonwp/routes.js#L313)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L342)
+1 -1
View File
@@ -97,4 +97,4 @@ null
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/mjsonwp/routes.js#L307)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L336)
@@ -72,7 +72,7 @@ driver.rotateDevice({x: 114, y: 198, duration: 5, radius: 3, rotation: 220, touc
### Endpoint
`POST /wd/hub/session/:session_id/device/rotate`
`POST /wd/hub/session/:session_id/appium/device/rotate`
### URL Parameters
@@ -97,4 +97,4 @@ null
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/mjsonwp/routes.js#L361)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L390)
@@ -94,4 +94,4 @@ null
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/mjsonwp/routes.js#L301)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L330)
@@ -98,4 +98,4 @@ null
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/mjsonwp/routes.js#L310)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L339)
@@ -102,4 +102,4 @@ null
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/mjsonwp/routes.js#L381)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L454)
@@ -83,4 +83,4 @@ True if the keyboard is shown. (`boolean`)
## See Also
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/mjsonwp/routes.js#L384)
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L457)

Some files were not shown because too many files have changed in this diff Show More