Compare commits

...
Author SHA1 Message Date
Isaac Murchie 88c2fdcc0a Release 1.7.2-beta2 2017-11-19 11:36:16 -05:00
Isaac A. Murchie f037247ea6 Fix settings docs (#9657) 2017-11-19 11:25:35 -05:00
Kazuaki Matsuo b9d40262d8 add allowInvisibleElements (#9622) 2017-11-15 14:31:54 -05:00
Isaac Murchie 9e3bc2b272 Add new doc to toc 2017-11-15 14:31:46 -05:00
Arseniy Rozov 1943b109e9 Add docs for multiple xcode versions installed (#9603)
* Add docs for multiple xcode versions installed

* Fix typos in doc file: multiple-xcode-versions.md

* Fix doc style: multiple-xcode-versions.md
2017-11-15 14:31:39 -05:00
Isaac Murchie 1df5451c75 Fix logging of caps 2017-11-15 14:31:31 -05:00
Dan Graham f0a33b82cf Fix broken links (#9542) 2017-11-15 14:31:23 -05:00
Wei Gu 6d14f03c04 Fix synchrous issue: appium may call session check even after session is deleted (#9550) 2017-11-15 14:31:15 -05:00
Dan Graham aec68fae69 Fixed multiple documentation problems (#9502)
* Fixed multiple documentation problems

* PR fixes

* PR fixes

* PR fixes

* PR fix. Bad link
2017-11-15 14:31:07 -05:00
Dan Graham c27137de0d Moved /basics up to root folder (#9501)
* Moving markdown files to basics folder caused some links to break (including on Appium Desktop)
* Moving them up one place instead
2017-11-15 14:30:52 -05:00
Isaac A. Murchie 89f60167b6 Normalize documentation names to kebab-case (#9487) 2017-11-15 14:30:43 -05:00
Dan Graham 3ff036f412 Fix docs (#9477)
* Fix strikethrough for Chinese docs

* Reorganize menus
2017-11-15 14:30:34 -05:00
Dan Graham ed4731e00b Fix strikethrough for Chinese docs (#9475) 2017-11-15 14:30:27 -05:00
Isaac A. Murchie 47d02c5d48 Fix strikethrough in docs (#9473) 2017-11-15 14:30:19 -05:00
vmaxim f32900f9ca [DOCS] Fixes for Commands -> Device (#9451)
* [DOCS] Fixes for `Commands -> Device`

* Replace pipelines with quotes in json_parameters section

* Add missed keys commands
2017-11-15 14:30:12 -05:00
vmaxim 6d38002341 [DOCS] Remove duplicate and organize Device section in table of context. 2017-11-15 14:30:03 -05:00
Isaac A. Murchie 8098669c25 Add chromedriver 2.33 to table (#9421) 2017-11-15 14:29:49 -05:00
vmaxim 7ec254d04d [MkDocs] Fixes for Commands -> Session (#9407) 2017-11-15 14:29:42 -05:00
Isaac Murchie c58ac3842f Remove duplicate iOS Ui Automation entry in drivers list 2017-11-15 14:29:35 -05:00
Dan Graham 12a8e42742 Fix broken link to ios-webkit-debug-proxy 2017-11-15 14:29:27 -05:00
Dan Graham 2bf3488fa8 Update how-to-write documentation doc (#9399) 2017-11-15 14:29:19 -05:00
Dan Graham 9347975c77 Add generated docs (#9398) 2017-11-15 14:29:11 -05:00
Dan Graham 90e3b2f1fe Added touch commands (#9355) 2017-11-15 14:29:01 -05:00
Dan Graham 2259312c3e Appium settings docs (#9390) 2017-11-15 14:28:54 -05:00
Dan Graham 3c9951eaac Document app commands (#9383) 2017-11-15 14:28:35 -05:00
Dan Graham 4f6c5ab636 Touch id commands (#9382) 2017-11-15 14:28:27 -05:00
Dan Graham 46448b2148 Add system commands (#9361) 2017-11-15 14:28:20 -05:00
Dan Graham de4db22ff1 Add file commands (#9360) 2017-11-15 14:28:12 -05:00
Dan Graham d28d156cc4 Added more device commands (#9359)
* App commands
* Android activity/package commands
* Rotate
2017-11-15 14:28:04 -05:00
Dan Graham 0b8bf6265e Added device interactions commands (#9358) 2017-11-15 14:27:56 -05:00
Dan Graham 4b7188d724 Document Appium touch actions (#9357)
* Also, fixed ruby client docs links
2017-11-15 14:27:49 -05:00
Dan Graham 7ed9089804 Completed JSONWP commands (#9356) 2017-11-15 14:27:41 -05:00
Dan Graham 8ddea01c89 Implemented mouse and session commands (#9354) 2017-11-15 14:27:33 -05:00
Isaac A. Murchie 33a387fe24 Docs Proposal: Move client docs into client table (#9371) 2017-11-15 14:27:23 -05:00
Dan Graham 83dce28a0c Document several web commands (#9353) 2017-11-15 14:27:15 -05:00
Dan Graham 4b51384dd9 Document JSONWP web commands (#9352) 2017-11-15 14:27:03 -05:00
Isaac A. Murchie 010df2a048 Add context documentation (#9368)
* Add context documentation

* Update for comments

* Add sessionId to url parameters
2017-11-15 14:26:55 -05:00
Sai Krishna bc3809de0d parallel-doc (#9346)
* parallel-doc

* added real device safari

* fixed review
2017-11-15 14:26:46 -05:00
Isaac A. Murchie 7c52a69b13 Add docs build to travis (#9372) 2017-11-15 14:26:37 -05:00
Dan Graham 9bcfb4f67c Added more element commands (#9351) 2017-11-15 14:26:25 -05:00
Dan Graham e929078d3c Document element commands (#9308) 2017-11-15 14:26:14 -05:00
Dan Graham aa536870e4 Wrote documentation for 6 element endpoints (#9281)
* /active
* /elements
* /element
* /value
* /submit
* /text
2017-11-15 14:26:06 -05:00
Dan Graham 02113dcb38 Added status and click YML (#9268)
* Renamed template.yml to example.yml
* Made some minor revisions (e.g.: made endpoint.response not required and have it show as 'null' when undefined)
2017-11-15 14:25:56 -05:00
Dan Graham 3bc3e69997 Render commands markdown using YML (#9260)
* Render commands markdown using YML

* Made directory 'commands-yml' which contains:
  * .babelrc to transpile the scripts
  * parse.js which renders the markdown
  * template.md which is a handlebars template that the yml gets passed to
  * validator.js which validates the yml data
* The rendering works by translating the yml to js, validating the js and then passing the data to template.md (which uses handlebars)
* The directory `/commands-yml/commands` gets rendered and then copied to `/docs/en/commands` as markdown
* Uses babel-node to run the script
* Uses validatejs to validate the javascript
* Template.yml is just a sample

* Infers the platform and appium support range from driver
  * For example, if you put in 'xcuitest: true' it will infer that platform support is 9.3+ and Appium Version is 1.6.0
2017-11-15 14:25:46 -05:00
Jonathan Lipps 85d740210a add more comprehensive getting started guide (#9248)
* add more comprehensive getting started guide

* fix language based on review feedback
2017-11-15 14:25:38 -05:00
bootstraponline bfef977d7e Update committer list
```ruby
require 'rubygems'
require 'octokit'

client =  Octokit::Client.new(login: ENV['OCTO_USER'],
                              password: ENV['OCTO_PASS'],
                              auto_paginate: true)

comitters_team = client.organization_teams('appium').detect { |team| team[:slug] == 'committers' }
existing_members = client.team_members(comitters_team.id).map { |user| user[:login] }

puts "member count: #{existing_members.length}"

tc_members = %w[jlipps bootstraponline penguinho dandoveralba mykola-mokhnach imurchie TikhomirovSergey KazuCocoa]

existing_members.each do |member|
  next if tc_members.include?(member)
  puts "* [@#{member}](https://github.com/#{member})"
end
```
2017-11-15 14:25:26 -05:00
Dan Graham 58214f6859 Add commands template and example commands (#9218) 2017-11-15 14:25:19 -05:00
metaJS 203093b6ac fix the table (#9230) 2017-11-15 14:25:06 -05:00
Jonathan Lipps 235166cfa7 clean up and update TOC based on new state of docs (#9222)
(should have done this with the last PR)
2017-11-15 14:24:57 -05:00
Jonathan Lipps bb51895860 complete new driver docs (#9221)
* update intro doc with appium desktop info and reformat it

* highlight that we also use the uiautomator2 driver

* ensure that the xcuitest docs also point to IWDP docs

* remove old and confusing 1.0 migration doc

* clean up the platform support doc though this should go away probably

* refer to driver docs in the readme and troubleshooting

* running-on-osx doc no longer needed now that we are referring to drivers

* move real-device-ci doc to appropriate place

* delete some unused docs and move structure around a bit

* add mac driver doc

* stub out windows and other driver docs

* write windows driver doc

* mention nvm as well as n for installation

* add espresso driver doc

* add selendroid driver doc

* remove links to general dependencies

* turn caps.md into a more explanatory doc

* fix 'appiupm' typo

* fix espresso copy-paste

* address review comments
2017-11-15 14:24:49 -05:00
Dan Graham 2fc6b01acd Move sitemap from appium.io to docs (#9220)
* So that we don't have to maintain the sitemap in a separate repo from the main doc repo
* Also, ignore mkdocs.yml, it's an artifcat of the site building process
2017-11-15 14:24:41 -05:00
Jonathan Lipps 0f979be221 add uiautomator and uiautomator2 driver docs 2017-11-15 14:24:29 -05:00
Dan Graham c87c5e961b Document TestObject staging process (#9208) 2017-11-15 14:24:19 -05:00
James VanHorn ae0683b22d Update doc to offer ios-deploy installation through Homebrew 2017-11-15 14:24:11 -05:00
Jonathan Lipps 7949ef1cce add ios uiautomation driver doc (#9173)
* add ios uiautomation driver doc

* address review comments

* fix link to xcode-iwd.sh
2017-11-15 14:23:58 -05:00
Vikram Ingleshwar 35c774057c automationName capability values specific to iOS & Android are updated (#9163)
fixes per review comment
2017-11-15 14:23:45 -05:00
Jonathan Lipps f15966c686 write doc for xcuitest driver
- consolidate information about it into one place
- part of #9138
2017-11-15 14:23:31 -05:00
Dan Graham 267470e6a0 Fix link to touch ID
The raw HTTP link was showing on GitHub but wasn't showing up as a link on the  MkDocs site.
2017-11-15 14:23:21 -05:00
Isaac Murchie 8f3dc8ffce Release 1.7.2-beta 2017-10-03 15:46:49 -04:00
dan@saucelabs.com 6c00766de3 Add shrinkwrap 2017-09-26 09:22:07 -07:00
dan@saucelabs.com 4bb23fc720 Prepare for v1.7.1 2017-09-26 09:10:34 -07:00
Isaac Murchie 040d0464fe Remove shrinkwrap 2017-09-25 12:43:31 -04:00
dan@saucelabs.com 8d99f95e8e Update package-lock 2017-09-18 11:00:01 -07:00
dan@saucelabs.com e06729c114 1.7.0 2017-09-18 10:19:41 -07:00
Isaac A. Murchie 9fc35d3ba7 Update changelog for 1.7.0 release (#9217) 2017-09-18 10:02:49 -07:00
Isaac A. Murchie 7ca35a3373 Update linting (#9123)
* Update linting

* Move minimum node version to 5

* Remove coverage for now

* Fix docs for node version

* Fail for node 4 and below
2017-08-31 12:24:32 -04:00
Isaac Murchie 704fec138d Prepare for Appium 1.7.0-beta 2017-08-30 08:23:06 -04:00
343 changed files with 24383 additions and 11566 deletions
+1
View File
@@ -1 +1,2 @@
sample-code
coverage
+2
View File
@@ -31,3 +31,5 @@ build/
__pycache__
old
.tern-project
coverage
docs/mkdocs.yml
-11
View File
@@ -1,11 +0,0 @@
{
"excludeFiles": ["node_modules/**"],
"requireCurlyBraces": ["for", "while", "do", "try", "catch"],
"requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch",
"return", "try", "catch", "function"],
"disallowMixedSpacesAndTabs": true,
"disallowTrailingWhitespace": true,
"requireSpacesInFunctionExpression": {
"beforeOpeningCurlyBrace": true
}
}
-5
View File
@@ -1,5 +0,0 @@
submodules
node_modules
lib/server/static
lib/devices/firefoxos/atoms
/Users/baba/Work/appium/ci/standalone-tools/node_modules
-11
View File
@@ -1,11 +0,0 @@
{
"laxcomma": true,
"undef": true,
"unused": true,
"node": true,
"eqeqeq": true,
"trailing": true,
"indent": 2,
"esnext": true,
"experimental": ["asyncawait"]
}
+1 -1
View File
@@ -12,5 +12,5 @@ _vimrc_local.vim
*.trace
*.sublime-
*.prefs
.jshintrc
./.npmignore
coverage
+1 -5
View File
@@ -3,7 +3,6 @@ sudo: false
node_js:
- "7"
- "6"
- "4"
env:
- CXX=g++-4.8
addons:
@@ -13,7 +12,4 @@ addons:
packages:
- g++-4.8
script:
- npm run lint
- npm run test
after_success:
- gulp coveralls
- npm run generate-docs && npm run test
+138
View File
@@ -1,3 +1,141 @@
CHANGES IN VERSION 1.7.1 (from 1.7.0)
===================================
Appium 1.7.1 fixes multiple issues with the previous release.
#### iOS
* Add ability to change default Simulator preferences
#### iOS - XCUITest
* Can use xctestrun file to launch WDA
* Fix bug that was causing startCapture to be called more than once
* Apply a workaround for setting default device orientation
* Update offset determination for iPad
#### iOS+Safari
* Add handler for starting/stopping JS console capture
#### Android
* Add support to force upgrade settings app
* Always assumes the file to be pushed by `pushFile` command contains binary data
* Add ADB option to to force reinstall on upgrade
#### Android - UiAutomator 2
* Do not proxy getting app strings
CHANGES IN VERSION 1.7.0 (from 1.6.5)
===================================
**Note:** This is a feature release, marking two major changes:
* Support iOS 11 through Xcode 9 beta 6
* Support multiple simultaneous sessions in Android and iOS (9+)
**Known Issues:**
* Android
* Webviews on Android O do not work because of a bug in Chromedriver. We
are working on a workaround. Chrome sessions still work
* iOS
* Touch ID enrollment on simulators in Xcode 9 does not work because of an
issue with AppleScript
* Scaling simulators with Xcode 9 does not work
* Simulators in Xcode 9 produce no meaningful device logs
* Parallel Safari/Webview sessions are not working due to an Apple bug
#### General
* Fix handling of sending keys to elements in recent versions of Selenium
* Allow `app` capability that is a url to have query parameters
* Begin to allow multiple device support in situations where it is possible
(e.g., iOS under Xcode 9)
* Add `isHeadless` capability to allow running simulator/emulator with no UI
#### iOS
* Add command to upload media to simulator
* Fix reliability of touch ID functionality
* Fix detection of system apps
* Update atoms used for MobileSafari automation to those of Selenium 3.5.3
* Add `realDeviceLogger` capability to allow specification of what program to
use to capture logs on real device
* Fix handling of `enablePerformanceLogging` capability in Safari tests
* Fix offset when Safari on an iPad has multiple tabs
#### iOS - XCUITest
* Support for latest Beta of iOS 11 (Xcode 9 beta 6)
* Multiple device support
* Fix handling of bundle id on simulators
* Make `nativeWebTap` a setting as well as a desired capability
* Allow `nativeWebTap` to work on real devices
* Do not try to uninstall app before installing on real device, which was causing
many issues
* Fix clearing of text fields
* Change behavior of `useNewWDA`: if `true`, forces uninstall of any existing
WebDriverAgent app on device. Set it to `true` if you want to apply different
startup options for WebDriverAgent for each session. Real devices require
WebDriverAgent client to run for as long as possible without reinstall/restart
to avoid issues. The `false` value will try to detect currently running WDA
listener executed by previous testing session(s) and reuse it if possible,
which is highly recommended for real device testing and to speed up suites of
multiple tests in general. A new WDA session will be triggered at the default
URL (http://localhost:8100) if WDA is not listening and `webDriverAgentUrl`
capability is not set.
* Allow setting url in native context
* Fix screenshot functionality
#### Android
* Add `remoteAdbHost` capability to specify the host on which adb is running, if
it is not localhost
* Add methods to start and stop recording the screen
* Fix screenshot commands
* Skip setting of mock location for emulators
* Add methods for emulator phone capacity: `sendSMS`, `gsmCall`, `gsmSignal`,
`gsmVoice`, `powerAC`, `powerCapacity`, and `networkSpeed`
* Fix cleanup of adb port forwarding during Chrome sessions
* Fix error where package name would be appended to fully qualified activity
name and package finding would then fail
* Properly handle bootstrap failure on launch
* Make sure correct logger is used for bootstrap
#### Android - UIAutomator 2
* Fix handling of `adbPort` capability
* Fix coverage handling
* Handle pressing and long pressing key codes
* Enable `nativeWebScreenshot` capability
* Fix restoring of IME when `unicodeKeyboard`/`resetKeyboard` capabilities are
used
* Add `disableWindowAnimation` capability to launch instrumentation with no
animation
* Correctly start ChromeDriver session for Chrome session
* Allow getting `password` attribute from elements
CHANGES IN VERSION 1.7.0-beta (from 1.6.5)
===================================
**Note:** This is a **_BETA_** release. Please direct any issues to the [Appium
issue tracker](https://github.com/appium/appium/issues) and provide as much
information as possible.
This release exists to provide an updatable package in order to get the latest
work on Appium. To install, first uninstall Appium and then re-install with the
`beta` tag. To get any changes that have been published to sub-packages, simply
repeat that process.
```
npm uninstall -g appium
npm install -g appium@beta
```
If you are running iOS tests with the XCUITest backend (i.e., iOS 10+ tests, and
some iOS 9.3 tests, if the `automationName` capability is set to `XCUITest`), you
should also remove the old build artifacts.
1. Remove derived data: `rm -rf ~/Library/Developer/Xcode/DerivedData/WebDriverAgent-*`
2. Remove `WebDriverAgentRunner` application from any real device being tested.
#### Android
* Add beta version of Espresso Driver. To use, set `automationName = espresso`.
CHANGES IN VERSION 1.6.6-beta.4 (from 1.6.5)
===================================
+23 -7
View File
@@ -52,15 +52,31 @@ and so on.
The current committers are (in addition to the TC members above):
* [@dpgraham](https://github.com/dpgraham)
* [@sravanmedarapu](https://github.com/sravanmedarapu)
* [@hugs](https://github.com/hugs)
* [@filmaj](https://github.com/filmaj)
* [@aluedeke](https://github.com/aluedeke)
* [@sebv](https://github.com/sebv)
* [@vgrigoruk](https://github.com/vgrigoruk)
* [@DylanLacey](https://github.com/DylanLacey)
* [@maudineormsby](https://github.com/maudineormsby)
* [@titusfortner](https://github.com/titusfortner)
* [@bayandin](https://github.com/bayandin)
* [@jdeff](https://github.com/jdeff)
* [@moizjv](https://github.com/moizjv)
* [@SrinivasanTarget](https://github.com/SrinivasanTarget)
* [@christian-bromann](https://github.com/christian-bromann)
* [@vrunoa](https://github.com/vrunoa)
* [@gempesaw](https://github.com/gempesaw)
* [@Jonahss](https://github.com/Jonahss)
* [@JamieEdge](https://github.com/JamieEdge)
* [@saikrishna321](https://github.com/saikrishna321)
* [@butomo1989](https://github.com/butomo1989)
* [@vikramvi](https://github.com/vikramvi)
* [@sravanmedarapu](https://github.com/sravanmedarapu)
* [@peepa](https://github.com/peepa)
* [@scottdixon](https://github.com/scottdixon)
* [@drpy](https://github.com/drpy)
* [@Astro03](https://github.com/Astro03)
* [@sbonebrake](https://github.com/sbonebrake)
* [@SrinivasanTarget](https://github.com/SrinivasanTarget)
* [@triager](https://github.com/triager)
* [@ddkjin](https://github.com/ddkjin)
* [@stuartbrussell-intuit](https://github.com/stuartbrussell-intuit)
### Contributors
+60 -119
View File
@@ -11,138 +11,81 @@
[![Build Status](https://team-appium.ci.cloudbees.com/job/Appium/badge/icon)](https://team-appium.ci.cloudbees.com/job/Appium/)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fappium%2Fappium.svg?type=shield)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fappium%2Fappium?ref=badge_shield)
Appium is an open source, cross-platform test automation tool for native, hybrid and mobile web and desktop apps, tested on simulators (iOS), emulators (Android), and real devices (iOS, Android, Windows, Mac).
Appium is an open source, cross-platform test automation tool for native,
hybrid and mobile web and desktop apps. We support simulators (iOS), emulators
(Android), and real devices (iOS, Android, Windows, Mac).
Want to skip straight to the action? Check out our [getting
started](/docs/en/about-appium/getting-started.md) doc.
### Supported Platforms
* iOS
* Android
* Windows
* Mac
Appium supports app automation across a variety of platforms, like iOS,
Android, and Windows. Each platform is supported by one or more "drivers",
which know how to automate that particular platform. Choose a driver below for
specific information about how that driver works and how to set it up:
See the [platform support doc](/docs/en/appium-setup/platform-support.md) for more detailed information.
* iOS
* The [XCUITest Driver](/docs/en/drivers/ios-xcuitest.md)
* (DEPRECATED) The [UIAutomation Driver](/docs/en/drivers/ios-uiautomation.md)
* Android
* (BETA) The [Espresso Driver](/docs/en/drivers/android-espresso.md)
* The [UiAutomator2 Driver](/docs/en/drivers/android-uiautomator2.md)
* (DEPRECATED) The [UiAutomator Driver](/docs/en/drivers/android-uiautomator.md)
* (DEPRECATED) The [Selendroid Driver](/docs/en/drivers/android-selendroid.md)
* The [Windows Driver](/docs/en/drivers/windows.md) (for Windows Desktop apps)
* The [Mac Driver](/docs/en/drivers/mac.md) (for Mac Desktop apps)
### Why Appium?
1. You don't have to recompile your app or modify it in any way, due
to use of standard automation APIs on all platforms.
2. You can write tests with your favorite dev tools using any [WebDriver](https://w3c.github.io/webdriver/webdriver-spec.html)-compatible
language such as Java, [Objective-C](https://github.com/appium/selenium-objective-c),
JavaScript with Node.js (in [promise, callback](https://github.com/admc/wd) or [generator](https://github.com/jlipps/yiewd) flavors),
PHP, Python, [Ruby](https://github.com/appium/ruby_lib), C#, Clojure, or Perl
with the Selenium WebDriver API and language-specific client libraries.
2. You can write tests with your favorite dev tools using any
[WebDriver](https://w3c.github.io/webdriver/webdriver-spec.html)-compatible
language such as Java, Objective-C, JavaScript (Node), PHP, Python, Ruby,
C#, Clojure, or Perl with the Selenium WebDriver API and [language-specific
client libraries](/docs/en/about-appium/appium-clients.md).
3. You can use any testing framework.
4. Appium has built-in mobile web and hybrid app support. Within the same
script you can switch seamlessly between native app automation and webview
automation, all using the WebDriver model that's already the standard for
web automation.
Investing in the [WebDriver](https://w3c.github.io/webdriver/webdriver-spec.html) protocol means you are betting on a single, free and open protocol for testing that has become a defacto standard. Don't lock yourself into a proprietary stack.
Investing in the
[WebDriver](https://w3c.github.io/webdriver/webdriver-spec.html) protocol means
you are betting on a single, free and open protocol for testing that has become
a web standard. Don't lock yourself into a proprietary stack.
If you use Apple's UIAutomation library without Appium you can only write tests
using JavaScript and you can only run tests through the Instruments application.
Similarly, with Google's UiAutomator you can only write tests in Java. Appium
opens up the possibility of true cross-platform native mobile automation. Finally!
For example, if you use Apple's XCUITest library without Appium you can only
write tests using Obj-C/Swift, and you can only run tests through Xcode.
Similarly, with Google's UiAutomator or Espresso you can only write tests in
Java. Appium opens up the possibility of true cross-platform native app
automation, for mobile and beyond. Finally!
### I don't get it yet...
If you're new to Appium, or want a fuller description of what this is all about, please read our [Introduction to Appium Concepts](/docs/en/about-appium/intro.md).
If you're new to Appium, or want a fuller description of what this is all
about, please read our [Introduction to Appium
Concepts](/docs/en/about-appium/intro.md).
### Requirements
Your environment needs to be setup for the particular mobile platforms that you
want to run tests on. See below for particular platform requirements.
Your environment needs to be set up for the particular platforms that you want
to run tests on. Each of the drivers above documents the requirements for their
particular brand of automation. At a minimum, you will need to be able to run
Node.js 6+.
If you want to run Appium via an `npm install`, hack with or contribute to Appium, you will need
[node.js and npm](http://nodejs.org) 4 or greater (use [n](https://github.com/visionmedia/n) or
`brew install node` to install Node.js. Make sure you have not installed Node or Appium with `sudo`,
otherwise you'll run into problems). We recommend the latest stable version.
### Get Started
To verify that all of Appium's dependencies are met you can use
`appium-doctor`. Install it with `npm install -g appium-doctor` (or run it
from [source](https://github.com/appium/appium-doctor)), then run
`appium-doctor` and supply the `--ios` or `--android` flags to verify that all
of the dependencies are set up correctly.
Check out our [Getting Started](/docs/en/about-appium/getting-started.md) guide
to get going with Appium.
You also need to download the Appium client for your language so you can write tests. The Appium clients are simple extensions to the WebDriver clients. You can see the list of clients and links to download instructions at the [Appium clients list](/docs/en/about-appium/appium-clients.md).
There is also a repository that contains [many examples of tests in a variety
of different languages](https://github.com/appium/sample-code)!
#### iOS Requirements
### Documentation
* Mac OS X 10.10 or higher, 10.11.1 recommended
* XCode >= 6.0, 7.1.1 recommended
* Apple Developer Tools (iPhone simulator SDK, command line tools)
* [Ensure you read our documentation on setting yourself up for iOS testing!](/docs/en/appium-setup/running-on-osx.md)
#### Android Requirements
* [Android SDK](http://developer.android.com) API >= 17 (Additional features require 18/19)
* Appium supports Android on OS X, Linux and Windows. Make sure you follow the
directions for setting up your environment properly for testing on different OSes:
* [linux](/docs/en/appium-setup/running-on-linux.md)
* [osx](/docs/en/appium-setup/running-on-osx.md)
* [windows](/docs/en/appium-setup/running-on-windows.md)
#### Windows Requirements
* Windows 10
* [Documentation](/docs/en/appium-setup/running-on-windows.md)
#### Mac Requirements
* Mac OS X 10.7 +
* [Documentation](https://github.com/penguinho/appium/blob/mac-driver/docs/en/appium-setup/running-on-osx.md#testing-mac-apps)
### Quick Start
Kick up an Appium server, and then run a test written in your favorite [WebDriver](https://w3c.github.io/webdriver/webdriver-spec.html)-compatible language!
You can run an Appium server using node.js or using the application, see below.
#### Using Node.js
```
$ npm install -g appium
$ appium
```
As we said above, you may want to run `appium-doctor` to ensure your system is set up properly:
```
$ npm install -g appium-doctor
$ appium-doctor
```
#### Using the Appium Desktop App
* [Download the Appium app](https://www.github.com/appium/appium-desktop/releases/latest/)
* Run it!
### Writing Tests for Appium
The main guide for getting started writing and running tests is [the running tests](/docs/en/writing-running-appium/running-tests.md) doc, which includes explanations for iOS, Android, and Android older devices. If you're interested in testing on physical hardware, you might be interested in our [real devices guide](/docs/en/appium-setup/real-devices.md).
(*Note*: If you're automating iOS 10+, be sure to check out our [XCUITest Migration Guide](/docs/en/advanced-concepts/migrating-to-xcuitest.md) since Apple's automation support has changed significantly since iOS 10, with corresponding changes in Appium).
Essentially, we support a subset of the [Selenium WebDriver JSON Wire Protocol](https://w3c.github.io/webdriver/webdriver-spec.html), and extend it so that you can specify mobile-targeted [desired capabilities](/docs/en/writing-running-appium/caps.md) to run your test through Appium.
You find elements by using a subset of WebDriver's element-finding strategies.
See [finding elements](/docs/en/writing-running-appium/finding-elements.md) for detailed information. We also have several extensions to the JSON Wire Protocol for [automating mobile gestures](/docs/en/writing-running-appium/touch-actions.md) like tap, flick, and swipe.
You can also automate web views in hybrid apps! See the [hybrid app guide](/docs/en/advanced-concepts/hybrid.md)
This repository contains [many examples of tests in a variety of different languages](https://github.com/appium/sample-code)!
For the full list of Appium doc pages, visit [this directory](/docs/en/).
### How It Works
Appium drives various native automation frameworks and provides an API based on
Selenium's [WebDriver JSON wire protocol](https://w3c.github.io/webdriver/webdriver-spec.html).
For new iOS versions (9.3 and up), Appium drives Apple's XCUITest library. Our support for XCUITest utilizes Facebook's [WebDriverAgent](https://github.com/facebook/webdriveragent) project.
For older iOS versions (9.3 and below), Appium drives Apple's UIAutomation library, using a strategy which is based on [Dan Cuellar's](http://github.com/penguinho) work on iOS Auto.
Android support uses the UiAutomator framework for newer platforms and
[Selendroid](http://github.com/DominikDary/selendroid) for older Android platforms.
Windows support uses Microsoft's [WinAppDriver](https://github.com/Microsoft/WinAppDriver)
For prettily-rendered docs, please visit [appium.io](http://appium.io). You can
always find the full list of Appium doc pages at [Appium's GitHub
Repo](https://github.com/appium/appium/tree/master/docs/en/) as well.
### Contributing
@@ -160,18 +103,16 @@ Interested in where Appium is heading in the future? Check out the [Roadmap](ROA
### User Forums
Announcements and debates often take place on the [Discussion Group](https://discuss.appium.io), be sure to sign up!
Announcements and debates often take place on the [Discussion
Group](https://discuss.appium.io), be sure to sign up!
### Troubleshooting
We put together a [troubleshooting guide](/docs/en/appium-setup/troubleshooting.md).
Please have a look here first if you run into any problems. It contains instructions for checking a lot
of common errors and how to get in touch with the community if you're stumped.
### Using Robots
Using Appium with [Tapster](https://github.com/hugs/tapsterbot) and other robots is possible,
check out the [Appium Robots](https://github.com/appium/robots) project!
We put together a [troubleshooting
guide](/docs/en/writing-running-appium/troubleshooting.md). Please have a look
here first if you run into any problems. It contains instructions for checking
a lot of common errors and how to get in touch with the community if you're
stumped.
### License
+9 -9
View File
@@ -20,25 +20,25 @@
"use strict";
var spawn = require('child_process').spawn,
_ = require('lodash');
const spawn = require('child_process').spawn;
const _ = require('lodash');
var args = process.argv.slice(2);
const args = process.argv.slice(2);
var RESTART_ON_MESSAGES = [
const RESTART_ON_MESSAGES = [
'Invalid message _rpc_applicationUpdated',
'Invalid message _rpc_applicationSentListing'];
var PROXY_CMD = 'ios_webkit_debug_proxy';
var proxy;
const PROXY_CMD = 'ios_webkit_debug_proxy';
let proxy;
var handleKillProcess = function (exitCode) {
const handleKillProcess = function (exitCode) {
console.log('\nKilling proxy process!');
proxy.kill('SIGTERM');
process.exit((exitCode || 0));
};
var startProxy = function () {
const startProxy = function () {
console.log('RUNNING:', PROXY_CMD, args.join(' '));
proxy = spawn(PROXY_CMD, args);
@@ -49,7 +49,7 @@ var startProxy = function () {
proxy.stderr.on('data', function (data) {
console.log('stderr: ' + data);
var restartMessage = _(RESTART_ON_MESSAGES).find(function (message) {
const restartMessage = _(RESTART_ON_MESSAGES).find(function (message) {
return ('' + data).indexOf(message) >= 0;
});
if (restartMessage) {
+3
View File
@@ -0,0 +1,3 @@
{
"presets": ["env"]
}
@@ -0,0 +1,84 @@
---
name: Get Current Context
short_description: Get the current context in which Appium is running
description:
>
Retrieve the current context. This can be either `NATIVE_APP` for the native
context, or a web view context, which will be:
* iOS - `WEBVIEW_<id>`
* Android - `WEBVIEW_<package name>`
For information on contexts, see Appium's [hybrid automation docs](/docs/en/writing-running-appium/web/hybrid.md).
example_usage:
java:
|
String context = driver.getContext();
python:
|
context = driver.current_context
# or
context = driver.context
javascript_wd:
|
let context = await driver.currentContext();
javascript_wdio:
|
let context = driver.context();
ruby:
|
context = @driver.current_context
php:
|
$context = $driver->context();
csharp:
|
// TODO C# sample
client_docs:
java: "http://appium.github.io/java-client/io/appium/java_client/AppiumDriver.html#getContext--"
python: "https://github.com/appium/python-client/blob/master/README.md#switching-between-native-and-webview"
javascript_wdio: "http://webdriver.io/api/mobile/context.html"
javascript_wd: "https://github.com/admc/wd/blob/master/doc/api.md"
ruby: "https://github.com/appium/ruby_lib"
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: /wd/hub/session/:session_id/context
method: 'GET'
url_parameters:
- name: session_id
description: ID of the session to route the command to
response:
- type: String
description: The name of the current context
# Links to specifications. Should link to at least one specification
specifications:
jsonwp: https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#webviews-and-other-contexts
@@ -0,0 +1,81 @@
---
name: Get All Contexts
short_description: Get all the contexts available to automate
description:
>
Retrieve all the contexts available to be automated. This will include, at
least, the native context. There can also be zero or more web view contexts.
For information on the format of the context names, see the [get context
documentation](/docs/en/commands/context/get-context.md).
For information on contexts, see Appium's [hybrid automation docs](/docs/en/writing-running-appium/web/hybrid.md).
example_usage:
java:
|
Set<String> contextNames = driver.getContextHandles();
python:
|
contexts = driver.contexts
javascript_wd:
|
let contexts = await driver.contexts();
javascript_wdio:
|
let contexts = driver.contexts();
ruby:
|
contexts = @driver.available_contexts
php:
|
$contexts = $driver->contexts();
csharp:
|
// TODO C# sample
client_docs:
java: "http://appium.github.io/java-client/io/appium/java_client/AppiumDriver.html#getContextHandles--"
python: "https://github.com/appium/python-client/blob/master/README.md#switching-between-native-and-webview"
javascript_wdio: "http://webdriver.io/api/mobile/contexts.html"
javascript_wd: "https://github.com/admc/wd/blob/master/doc/api.md"
ruby: "https://github.com/appium/ruby_lib"
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: /wd/hub/session/:session_id/contexts
method: 'GET'
url_parameters:
- name: session_id
description: ID of the session to route the command to
response:
- type: Array<String>
description: Array of the names of all available contexts
# Links to specifications. Should link to at least one specification
specifications:
jsonwp: https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#webviews-and-other-contexts
@@ -0,0 +1,102 @@
---
name: Set Current Context
short_description: Set the context being automated
description:
>
Set the current context to that passed in. If this is moving into a web view
context it will involve attempting to connect to that web view:
* iOS - attempt to connect to the application through the remote debugger
* Android - start a [Chromedriver](/docs/en/writing-running-appium/web/chromedriver.md)
process and begin a session to connect to the web view
For information on contexts, see Appium's [hybrid automation docs](/docs/en/writing-running-appium/web/hybrid.md).
example_usage:
java:
|
Set<String> contextNames = driver.getContextHandles();
driver.context(contextNames.toArray()[1]);
// ...
driver.context("NATIVE_APP");
python:
|
webview = driver.contexts[1]
driver.switch_to.context(webview)
# ...
driver.switch_to.context('NATIVE_APP')
javascript_wd:
|
let contexts = await driver.contexts();
await driver.context(contexts[1]);
// ...
await driver.context('NATIVE_APP');
javascript_wdio:
|
let contexts = driver.contexts();
driver.context(contexts[1]);
// ...
driver.context('NATIVE_APP');
ruby:
|
webview = @driver.available_contexts[1]
@driver.switch_to.context(webview)
# ...
@driver.switch_to.context('NATIVE_APP')
php:
|
$contexts = $driver->contexts();
$driver->context($contexts[1]);
// ...
$driver->context('NATIVE_APP');
csharp:
|
// TODO C# sample
client_docs:
java: "http://appium.github.io/java-client/io/appium/java_client/AppiumDriver.html#context-java.lang.String-"
python: "https://github.com/appium/python-client/blob/master/README.md#switching-between-native-and-webview"
javascript_wdio: "http://webdriver.io/api/mobile/context.html"
javascript_wd: "https://github.com/admc/wd/blob/master/doc/api.md"
ruby: "https://github.com/appium/ruby_lib"
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: /wd/hub/session/:session_id/context
method: 'POST'
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: name
type: String
description: The name of the context to which to change
# Links to specifications. Should link to at least one specification
specifications:
jsonwp: https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#webviews-and-other-contexts
@@ -0,0 +1,72 @@
---
name: Get Current Activity
short_description: Get the name of the current Android activity
example_usage:
java:
|
String activity = driver.currentActivity();
python:
|
activity = self.driver.current_activity();
javascript_wd:
|
let activity = await driver.getCurrentActivity();
javascript_wdio:
|
let activity = driver.currentActivity();
ruby:
|
@driver.current_activity;
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "http://appium.github.io/java-client/io/appium/java_client/android/StartsActivity.html#currentActivity--"
python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L447"
javascript_wdio: "http://webdriver.io/api/mobile/currentActivity.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2519"
ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/Core/Device:current_activity"
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: true
php: true
csharp: true
javascript_wd: true
javascript_wdio: true
# Information about the HTTP endpoints
endpoint:
url: /wd/hub/session/:session_id/device/current_activity
method: GET
url_parameters:
- name: session_id
description: ID of the session to route the command to
response:
- type: string
description: Name of the current [activity](https://developer.android.com/reference/android/app/Activity.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#L366
@@ -0,0 +1,68 @@
---
name: Get Current Package
short_description: Get the name of the current Android package
example_usage:
java:
|
String package = driver.getCurrentPackage();
python:
|
package = self.driver.current_package();
javascript_wd:
|
let package = await driver.getCurrentPackage();
ruby:
|
@driver.current_package;
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "http://appium.github.io/java-client/io/appium/java_client/android/StartsActivity.html#getCurrentPackage--"
python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L453"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2526"
ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/Core/Device:current_package"
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: true
php: true
csharp: true
javascript_wd: true
javascript_wdio: false
# Information about the HTTP endpoints
endpoint:
url: /wd/hub/session/:session_id/device/current_package
method: GET
url_parameters:
- name: session_id
description: ID of the session to route the command to
response:
- type: string
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
@@ -0,0 +1,97 @@
---
name: Start Activity
short_description: Start an Android activity by providing package name and activity name
example_usage:
java:
|
driver.startActivity(new Activity("com.example", "ActivityName"));
python:
|
self.driver.start_activity("com.example", "ActivityName");
javascript_wd:
|
await driver.startActivity({
appPackage: "com.example",
appActivity: "ActivityName"
});
javascript_wdio:
|
driver.startActivity("com.example", "ActivityName");
ruby:
|
@driver.start_activity("com.example", "ActivityName");
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "http://appium.github.io/java-client/io/appium/java_client/android/AndroidMobileCommandHelper.html#startActivityCommand-java.lang.String-java.lang.String-java.lang.String-java.lang.String-java.lang.String-java.lang.String-java.lang.String-java.lang.String-boolean-"
python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L591"
javascript_wdio: "http://webdriver.io/api/mobile/startActivity.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2948"
ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/Android/Device:start_activity"
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: true
php: true
csharp: true
javascript_wd: true
javascript_wdio: true
# Information about the HTTP endpoints
endpoint:
url: /wd/hub/session/:session_id/device/start_activity
method: POST
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: appPackage
type: string
description: Name of the [package](https://developer.android.com/reference/java/lang/Package.html)
- name: appActivity
type: string
description: Name of the [activity](https://developer.android.com/reference/android/app/Activity.html)
- name: appWaitPackage
type: string
description: Automation will begin after this package starts
- name: intentAction
type: string
description: "[Intent](https://developer.android.com/reference/android/content/Intent.html) action which will be used to start activity"
- name: intentCategory
type: string
description: Intent category which will be used to start activity
- name: intentFlags
type: string
description: Flags that will be used to start activity
- name: optionalIntentArguments
type: string
description: Additional intent arguments that will be used to start activity
- name: dontStopAppOnReset
type: boolean
description: Should the app stop on reset
# 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
@@ -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.
# 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
@@ -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
@@ -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
@@ -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
@@ -0,0 +1,73 @@
---
name: Install App
short_description: Install the given app onto the device
example_usage:
java:
|
driver.installApp("/Users/johndoe/path/to/app.apk");
python:
|
self.driver.install_app('/Users/johndoe/path/to/app.apk');
javascript_wd:
|
await driver.installAppOnDevice('/Users/johndoe/path/to/app.apk');
javascript_wdio:
|
driver.installApp('/Users/johndoe/path/to/app.apk')
ruby:
|
@driver.install_app('/Users/johndoe/path/to/app.apk');
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "http://appium.github.io/java-client/io/appium/java_client/InteractsWithApps.html#installApp-java.lang.String-"
python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L554"
javascript_wdio: "http://webdriver.io/api/mobile/installApp.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2540"
ruby: "https://github.com/appium/ruby_lib/blob/eb7680f6db1e821901045beacba0a8b80de722fb/lib/appium_lib/core/common/command.rb#L38"
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 # TODO: Verify this
windows:
windows: false # TODO: Verify this
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/device/install_app
method: POST
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: appPath
type: string
description: Path of the app being installed
# 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
@@ -0,0 +1,76 @@
---
name: Is App Installed
short_description: Check whether the specified app is installed on the device
example_usage:
java:
|
driver.isAppInstalled("com.example.AppName");
python:
|
self.driver.is_app_installed('com.example.AppName');
javascript_wd:
|
await driver.isAppInstalledOnDevice('com.example.AppName');
javascript_wdio:
|
driver.isAppInstalled('com.example.AppName')
ruby:
|
@driver.app_installed?('com.example.AppName');
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "http://appium.github.io/java-client/io/appium/java_client/InteractsWithApps.html#isAppInstalled-java.lang.String-"
python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L542"
javascript_wdio: "http://webdriver.io/api/mobile/isAppInstalled.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2586"
ruby: "https://github.com/appium/ruby_lib/blob/master/lib/appium_lib/core/common/command.rb#L40"
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 # TODO: Verify this
windows:
windows: false # TODO: Verify this
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/device/app_installed
method: POST
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: bundleId
type: string
description: iOS bundleID or Android package name
response:
- type: boolean
description: Return true if installed, false if not
# 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
@@ -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
@@ -0,0 +1,76 @@
---
name: Remove App
short_description: Remove an app from the device
example_usage:
java:
|
driver.removeApp("com.example.AppName");
python:
|
self.driver.remove_app('com.example.AppName');
javascript_wd:
|
await driver.removeAppFromDevice('com.example.AppName');
javascript_wdio:
|
driver.removeApp('com.example.AppName')
ruby:
|
@driver.remove_app('com.example.AppName');
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "http://appium.github.io/java-client/io/appium/java_client/InteractsWithApps.html#removeApp-java.lang.String-"
python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L566"
javascript_wdio: "http://webdriver.io/api/mobile/removeApp.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2563"
ruby: "https://github.com/appium/ruby_lib/blob/master/lib/appium_lib/core/common/command.rb#L39"
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 # TODO: Verify this
windows:
windows: false # TODO: Verify this
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/device/remove_app
method: POST
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: appId
type: string
description: The iOS [App ID](https://developer.apple.com/library/content/documentation/General/Conceptual/DevPedia-CocoaCore/AppID.html)
- name: bundleId
type: string
description: iOS bundleID or Android package name
# 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
@@ -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
@@ -0,0 +1,76 @@
---
name: Pull File
short_description: Retrieve a file from the device's file system
example_usage:
java:
|
byte[] fileBase64 = driver.pullFile("/path/to/device/foo.bar");
python:
|
file_base64 = self.driver.pull_file('/path/to/device/foo.bar');
javascript_wd:
|
let fileBase64 = await driver.pullFile('/path/to/device/foo.bar');
javascript_wdio:
|
let data = driver.pullFile('/data/local/tmp/file.txt');
ruby:
|
@driver.pull_file('/data/local/tmp/file.txt');
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "http://appium.github.io/java-client/io/appium/java_client/InteractsWithFiles.html#pullFile-java.lang.String-"
python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L491"
javascript_wdio: "http://webdriver.io/api/mobile/pullFile.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2665"
ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/Core/Device:pull_file"
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 # TODO: Verify this
windows:
windows: false # TODO: Verify this
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/appium/device/pull_file
method: POST
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: path
type: string
description: Path on the device to pull file from
response:
- type: string
description: Contents of file in base64
# 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
@@ -0,0 +1,76 @@
---
name: Pull Folder
short_description: Retrieve a folder from the device's file system
example_usage:
java:
|
byte[] folder = driver.pullFolder("/path/to/device/foo.bar");
python:
|
folder_base64 = self.driver.pull_folder('/path/to/device/foo.bar');
javascript_wd:
|
let folderBase64 = await driver.pullFolder('/path/to/device/foo.bar');
javascript_wdio:
|
let data = driver.pullFolder('/data/local/tmp/file.txt');
ruby:
|
@driver.pull_folder('/data/local/tmp/file.txt');
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "http://appium.github.io/java-client/io/appium/java_client/InteractsWithFiles.html#pullFolder-java.lang.String-"
python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L503"
javascript_wdio: "http://webdriver.io/api/mobile/pullFolder.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2688"
ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/Core/Device:pull_folder"
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 # TODO: Verify this
windows:
windows: false # TODO: Verify this
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/device/pull_folder
method: POST
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: path
type: string
description: Path to an entire folder on the device
response:
- type: string
description: A string of Base64 encoded data, representing a zip archive of the contents of the requested folder.
# 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
@@ -0,0 +1,77 @@
---
name: Push File
short_description: Place a file onto the device in a particular place
example_usage:
java:
|
driver.pushFile("/path/to/device/foo.bar", new File("/Users/johndoe/files/foo.bar"));
python:
|
self.driver.push_file('/path/to/device/foo.bar', 'QXJlIHlvdXIgYmVlcnMgb2theT8=');
javascript_wd:
|
await driver.pushFileToDevice('/path/to/device/foo.bar', 'QXJlIHlvdXIgYmVlcnMgb2theT8=');
javascript_wdio:
|
let data = new Buffer("Hello World").toString('base64');
driver.pushFile('/data/local/tmp/file.txt', data);
ruby:
|
@driver.push_file('/Users/johndoe/path/to/app.apk');
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "http://appium.github.io/java-client/io/appium/java_client/android/PushesFiles.html#pushFile-java.lang.String-java.io.File-"
python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L515"
javascript_wdio: "http://webdriver.io/api/mobile/pushFile.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2640"
ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/Core/Device:push_file"
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 # TODO: Verify this
windows:
windows: false # TODO: Verify this
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/appium/device/push_file
method: POST
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: path
type: string
description: Path to install the data to
- name: data
type: string
description: Contents of file in base64
# 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
@@ -0,0 +1,69 @@
---
name: Is Device Locked
short_description: Check whether the device is locked or not
example_usage:
java:
|
boolean isLocked = driver.isLocked();
javascript_wd:
|
let isLocked = await driver.isLocked();
javascript_wdio:
|
driver.isLocked();
ruby:
|
@driver.device_locked()
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "http://appium.github.io/java-client/io/appium/java_client/android/LocksAndroidDevice.html#isLocked--"
javascript_wdio: "http://webdriver.io/api/mobile/isLocked.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2407"
ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/Core/Device:device_locked%3F"
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 # TODO Confirm this that mouse movements
windows:
windows: true # TODO Confirm this
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/device/is_locked
method: POST
url_parameters:
- name: session_id
description: ID of the session to route the command to
response:
- type: boolean
description: True if the device is locked, false if not
# 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
@@ -0,0 +1,75 @@
---
name: Lock
short_description: Lock the device
example_usage:
java:
|
driver.lockDevice();
python:
|
self.driver.lock();
javascript_wd:
|
await driver.lock();
javascript_wdio:
|
driver.lock();
ruby:
|
@driver.lock()
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "http://appium.github.io/java-client/io/appium/java_client/android/LocksAndroidDevice.html#lockDevice--"
python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L643"
javascript_wdio: "http://webdriver.io/api/mobile/lock.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2363"
ruby: "https://github.com/appium/ruby_lib/blob/master/lib/appium_lib/core/common/command.rb#L37"
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: true
android:
uiautomator2: true
uiautomator: true
mac:
mac: false # TODO Confirm this that mouse movements
windows:
windows: true # TODO Confirm this
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/device/lock
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 lock the screen (iOS only).
# 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
@@ -0,0 +1,80 @@
---
name: Rotate
short_description: Rotate the device in three dimensions
example_usage:
java:
|
driver.rotate(new DeviceRotation(10, 10, 10));
javascript_wd:
|
driver.rotateDevice({x: 114, y: 198, duration: 5, radius: 3, rotation: 220, touchCount: 2});
javascript_wdio:
|
driver.rotate(100, 100);
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "http://appium.github.io/java-client/io/appium/java_client/AppiumDriver.html#rotate-org.openqa.selenium.DeviceRotation-"
javascript_wdio: "http://webdriver.io/api/mobile/rotate.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2470"
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: false
uiautomator: false
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: /wd/hub/session/:session_id/device/rotate
method: 'POST'
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: x
type: number
description: x offset to use for the center of the rotate gesture
- name: y
type: number
description: y offset to use for the center of the rotate gesture
- name: radius
type: number
description: The distance in points from the center to the edge of the circular path
- name: rotation
type: number
description: The length of rotation in radians
- name: touchCount
type: number
description: The number of touches to use in the specified gesture. (Effectively, the number of fingers a user would use to make the specified gesture.) Valid values are 1 to 5.
- name: duration
type: number
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
@@ -0,0 +1,70 @@
---
name: Shake
short_description: Perform a shake action on the device
example_usage:
java:
|
driver.shake();
python:
|
self.driver.shake();
javascript_wd:
|
await driver.shake();
javascript_wdio:
|
driver.shake();
ruby:
|
@driver.shake()
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "http://appium.github.io/java-client/io/appium/java_client/ios/ShakesDevice.html#shake--"
python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L655"
javascript_wdio: "http://webdriver.io/api/mobile/shake.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2342"
ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/Core/Device:shake"
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: true
android:
uiautomator2: false
uiautomator: false
mac:
mac: false # TODO Confirm this that mouse movements
windows:
windows: false # TODO Confirm this
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/device/shake
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#L301
@@ -0,0 +1,69 @@
---
name: Unlock
short_description: Unlock the device
example_usage:
java:
|
driver.lockDevice();
driver.unlockDevice();
python:
|
self.driver.lock();
self.driver.unlock();
javascript_wd:
|
await driver.lock();
await driver.unlock();
javascript_wdio:
|
driver.lock()
.unlock();
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "http://appium.github.io/java-client/io/appium/java_client/android/LocksAndroidDevice.html#unlockDevice---"
javascript_wdio: "http://webdriver.io/api/mobile/unlock.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2386"
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 # TODO Confirm this that mouse movements
windows:
windows: true # TODO Confirm this
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/device/unlock
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#L310
@@ -0,0 +1,82 @@
---
name: Hide Keyboard
short_description: Hide soft keyboard
example_usage:
java:
|
driver.hideKeyboard();
python:
|
self.driver.hide_keyboard()
javascript_wd:
|
await driver.hideDeviceKeyboard();
javascript_wdio:
|
driver.hideDeviceKeyboard();
ruby:
|
@driver.hide_keyboard()
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "http://appium.github.io/java-client/io/appium/java_client/HidesKeyboard.html#hideKeyboard--"
python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L378"
javascript_wdio: "http://webdriver.io/api/mobile/hideDeviceKeyboard.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2609"
ruby: "https://github.com/appium/ruby_lib/blob/master/lib/appium_lib/core/common/command.rb#L42"
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: 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/appium/device/hide_keyboard
method: 'POST'
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: strategy
type: string
description: Hide keyboard strategy (optional, UIAutomation only). Available strategies - 'press', 'pressKey', 'swipeDown', 'tapOut', 'tapOutside', 'default'.
- name: key
type: string
description: Key (optional)
- name: keyCode
type: string
description: Key code (optional)
- name: keyName
type: string
description: Key name (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#L381
@@ -0,0 +1,52 @@
---
name: Is Keyboard Shown
short_description: Whether or not the soft keyboard is shown
example_usage:
java:
|
boolean isKeyboardShown = driver.isKeyboardShown();
ruby:
|
@driver.is_keyboard_shown();
client_docs:
java: "http://appium.github.io/java-client/io/appium/java_client/android/HasDeviceDetails.html#isKeyboardShown--"
ruby: "https://github.com/appium/ruby_lib/blob/master/lib/appium_lib/core/common/command.rb#L24"
# Driver support by platform
driver_support:
ios:
xcuitest: true
uiautomation: true
android:
uiautomator2: true
uiautomator: true
mac:
mac: false
windows:
windows: true
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: /wd/hub/session/:session_id/appium/device/is_keyboard_shown
method: 'GET'
url_parameters:
- name: session_id
description: ID of the session to route the command to
response:
- type: boolean
description: True if the keyboard is shown.
# 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
@@ -0,0 +1,73 @@
---
name: Long Press Key Code
short_description: Press and hold a particular key code on the device
example_usage:
java:
|
driver.longPressKeyCode(AndroidKeyCode.HOME);
python:
|
self.driver.long_press_keycode(10);
javascript_wdio:
|
driver.longPressKeyCode(10);
ruby:
|
@driver.long_press_keycode(10)
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "http://appium.github.io/java-client/io/appium/java_client/PressesKeyCode.html#longPressKeyCode-int-"
python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L431"
javascript_wdio: "http://webdriver.io/api/mobile/longPressKeycode.html"
ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/Core/Device:long_press_keycode"
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 # TODO Confirm this that mouse movements
windows:
windows: false # TODO Confirm this
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/device/long_press_keycode
method: POST
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: keycode
type: number
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
# 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
@@ -0,0 +1,73 @@
---
name: Press Key Code
short_description: Press a particular key on the device
example_usage:
java:
|
driver.pressKeyCode(AndroidKeyCode.SPACE, AndroidKeyMetastate.META_SHIFT_ON);
python:
|
self.driver.press_keycode(10);
javascript_wdio:
|
driver.pressKeycode(10);
ruby:
|
@driver.press_keycode(10)
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "http://appium.github.io/java-client/io/appium/java_client/PressesKeyCode.html#pressKeyCode-int-"
python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L415"
javascript_wdio: "http://webdriver.io/api/mobile/longPressKeycode.html"
ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/Core/Device:long_press_keycode"
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 # TODO Confirm this that mouse movements
windows:
windows: false # TODO Confirm this
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/device/press_keycode
method: POST
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: keycode
type: number
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
# 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
@@ -0,0 +1,59 @@
---
name: GSM Call
short_description: Make GSM call (Emulator only)
example_usage:
javascript_wd:
|
await driver.gsmCall('555-123-4567', 'Phone');
php:
|
// TODO
csharp:
|
// TODO
client_docs:
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L3183"
php: "https://github.com/appium/php-client/" # TODO
csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO
# Driver support by platform
driver_support:
ios:
xcuitest: false
uiautomation: false
android:
uiautomator2: false
uiautomator: true
mac:
mac: false
windows:
windows: false
client_support:
java: false
python: false
ruby: false
php: false
csharp: false
javascript_wd: true
javascript_wdio: true
# Information about the HTTP endpoints
endpoint:
url: /session/:session_id/appium/device/gsm_call
method: POST
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: phoneNumber
type: string
description: The phone number to call to
- name: action
type: string
description: The action - 'call', 'accept', 'cancel', 'hold'.
# 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
@@ -0,0 +1,56 @@
---
name: GSM Signal
short_description: Set GSM signal strength (Emulator only)
example_usage:
javascript_wd:
|
await driver.gsmSignal(3);
php:
|
// TODO
csharp:
|
// TODO
client_docs:
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L3221"
php: "https://github.com/appium/php-client/" # TODO
csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO
# Driver support by platform
driver_support:
ios:
xcuitest: false
uiautomation: false
android:
uiautomator2: false
uiautomator: true
mac:
mac: false
windows:
windows: false
client_support:
java: false
python: false
ruby: false
php: false
csharp: false
javascript_wd: true
javascript_wdio: true
# Information about the HTTP endpoints
endpoint:
url: /session/:session_id/appium/device/gsm_signal
method: POST
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: signalStrengh
type: string
description: Signal strength in the range [0, 4]
# 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
@@ -0,0 +1,56 @@
---
name: GSM Voice
short_description: Set GSM voice state (Emulator only)
example_usage:
javascript_wd:
|
await driver.gsmVoice('Voice state');
php:
|
// TODO
csharp:
|
// TODO
client_docs:
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L3241"
php: "https://github.com/appium/php-client/" # TODO
csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO
# Driver support by platform
driver_support:
ios:
xcuitest: false
uiautomation: false
android:
uiautomator2: false
uiautomator: true
mac:
mac: false
windows:
windows: false
client_support:
java: false
python: false
ruby: false
php: false
csharp: false
javascript_wd: true
javascript_wdio: true
# Information about the HTTP endpoints
endpoint:
url: /session/:session_id/appium/device/gsm_voice
method: POST
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: state
type: string
description: State of GSM voice - 'unregistered', 'home', 'roaming', 'searching', 'denied', 'off', 'on'.
# 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
@@ -0,0 +1,62 @@
---
name: Send SMS
short_description: Simulate an SMS message (Emulator only)
example_usage:
javascript_wd:
|
await driver.sendSms('555-123-4567', 'Hey lol');
ruby:
|
// TODO
php:
|
// TODO
csharp:
|
// TODO
client_docs:
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L3183"
php: "https://github.com/appium/php-client/" # TODO
csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO
# 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: false
python: false
ruby: false
php: false
csharp: false
javascript_wd: true
javascript_wdio: true
# Information about the HTTP endpoints
endpoint:
url: /session/:session_id/appium/device/send_sms
method: POST
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: phoneNumber
type: string
description: The phone number to send the SMS too
- name: message
type: string
description: The SMS message
# 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
@@ -0,0 +1,60 @@
---
name: Toggle Airplane Mode
short_description: Toggle airplane mode on device
example_usage:
javascript_wd:
|
await driver.toggleAirplaneMode();
javascript_wdio:
|
driver.toggleAirplaneMode();
ruby:
|
@driver.toggle_flight_mode();
php:
|
// TODO
csharp:
|
// TODO
client_docs:
javascript_wdio: "http://webdriver.io/api/mobile/toggleAirplaneMode.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2712"
ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/Core/Device:toggle_flight_mode"
php: "https://github.com/appium/php-client/" # TODO
csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO
# 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: false
python: false
ruby: true
php: true
csharp: true
javascript_wd: true
javascript_wdio: true
# Information about the HTTP endpoints
endpoint:
url: /session/:session_id/appium/device/toggle_airplane_mode
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#L396
@@ -0,0 +1,56 @@
---
name: Toggle Data
short_description: Switch the state of data service
example_usage:
javascript_wd:
|
await driver.toggleData();
javascript_wdio:
|
driver.toggleData();
php:
|
// TODO
csharp:
|
// TODO
client_docs:
javascript_wdio: "http://webdriver.io/api/mobile/toggleData.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2771"
php: "https://github.com/appium/php-client/" # TODO
csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO
# 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: false
python: false
ruby: true
php: true
csharp: true
javascript_wd: true
javascript_wdio: true
# Information about the HTTP endpoints
endpoint:
url: /session/:session_id/appium/device/toggle_data
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#L399
@@ -0,0 +1,64 @@
---
name: Toggle Location Services
short_description: Switch the state of the location service
example_usage:
java:
|
driver.toggleLocationServices();
python:
|
self.driver.toggle_location_services();
javascript_wd:
|
await driver.toggleLocationServices();
javascript_wdio:
|
driver.toggleLocationServices();
php:
|
// TODO
csharp:
|
// TODO
client_docs:
java: "http://appium.github.io/java-client/io/appium/java_client/android/AndroidDriver.html#toggleLocationServices--"
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"
php: "https://github.com/appium/php-client/" # TODO
csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO
# 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/device/toggle_location_services
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#L405
@@ -0,0 +1,56 @@
---
name: Toggle WiFi
short_description: Switch the state of the wifi service
example_usage:
javascript_wd:
|
await driver.toggleWiFi();
javascript_wdio:
|
driver.toggleWiFi();
php:
|
// TODO
csharp:
|
// TODO
client_docs:
javascript_wdio: "http://webdriver.io/api/mobile/toggleWiFi.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2738"
php: "https://github.com/appium/php-client/" # TODO
csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO
# 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: false
python: false
ruby: true
php: true
csharp: true
javascript_wd: true
javascript_wdio: true
# Information about the HTTP endpoints
endpoint:
url: /session/:session_id/appium/device/toggle_wifi
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#L402
@@ -0,0 +1,70 @@
---
name: Get Performance Data
short_description: Returns the information of the system state which is supported to read as like cpu, memory, network traffic, and battery
example_usage:
java:
|
List<List<Object>> performanceData = driver.getPerformanceData("my.app.package", "cpuinfo", 5);
ruby:
|
@driver.get_performance_data()
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "http://appium.github.io/java-client/io/appium/java_client/android/HasSupportedPerformanceDataType.html#getSupportedPerformanceDataTypes--"
ruby: "https://github.com/appium/ruby_lib/blob/master/lib/appium_lib/core/common/command.rb#L59"
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 # TODO Confirm this that mouse movements
windows:
windows: false # TODO Confirm this
client_support:
java: true
python: false
ruby: true
php: false
csharp: false
javascript_wd: true
javascript_wdio: true
# Information about the HTTP endpoints
endpoint:
url: /session/:session_id/appium/getPerformanceData
method: POST
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: package_name
type: string
description: The package name of the application
- name: data_type
type: string
description: The type of system state which wants to read. It should be one of the supported performance data types.
- name: data_read_timeout
type: number
description: The number of attempts to read (optional)
response:
- type: array<string>
description: The information type of the system state which is supported to read as like cpu, memory, network traffic, and battery
# 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
@@ -0,0 +1,60 @@
---
name: Get Performance Data Types
short_description: Returns the information types of the system state which is supported to read as like cpu, memory, network traffic, and battery
example_usage:
java:
|
List<String> performanceTypes = driver.getSupportedPerformanceDataTypes();
ruby:
|
@driver.get_performance_data_types()
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "http://appium.github.io/java-client/io/appium/java_client/android/HasSupportedPerformanceDataType.html#getSupportedPerformanceDataTypes--"
ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/Android/Device:get_performance_data_types"
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 # TODO Confirm this that mouse movements
windows:
windows: false # TODO Confirm this
client_support:
java: true
python: false
ruby: true
php: false
csharp: false
javascript_wd: true
javascript_wdio: true
# Information about the HTTP endpoints
endpoint:
url: /session/:session_id/appium/performanceData/types
method: POST
url_parameters:
- name: session_id
description: ID of the session to route the command to
response:
- type: array<string>
description: The available performance data types (cpuinfo|batteryinfo|networkinfo|memoryinfo)
# 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
@@ -0,0 +1,80 @@
---
name: Toggle Touch ID Enrollment
short_description: Toggle the simulator being [enrolled](https://support.apple.com/en-ca/ht201371) to accept touchId (iOS Simulator only)
description:
|
To enable this feature, the `allowTouchIdEnroll` desired capability must be set to true. When `allowTouchIdEnroll` is set to true
the Simulator will be enrolled by default, and the 'Toggle Touch ID Enrollment' changes the enrollment state.
This call will only work if the Appium process or its parent application (e.g., Terminal.app or Appium.app) has access to Mac OS accessibility in System Preferences > Security & Privacy > Privacy > Accessibility list
example_usage:
java:
|
driver.toggleTouchIDEnrollment(true);
python:
|
self.driver.toggle_touch_id_enrollment()
javascript_wd:
|
await driver.toggleTouchIdEnrollment();
javascript_wdio:
|
driver.toggleTouchIdEnrollment(true);
ruby:
|
@driver.toggle_touch_id_enrollment()
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "http://appium.github.io/java-client/io/appium/java_client/ios/PerformsTouchID.html#performTouchID-boolean-"
python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L670"
javascript_wdio: "http://webdriver.io/api/mobile/toggleTouchIdEnrollment.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L3150"
ruby: "https://github.com/appium/ruby_lib/blob/master/lib/appium_lib/core/common/command.rb#L64"
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: false
android:
uiautomator2: false
uiautomator: false
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/simulator/toggle_touch_id_enrollment
method: 'POST'
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: enabled
type: boolean
description: If true, enable, if falsey disable, otherwise toggle (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#L427
@@ -0,0 +1,92 @@
---
name: Perform Touch ID
short_description: Simulate a [touch id](https://support.apple.com/en-ca/ht201371) event (iOS Simulator only)
description:
|
To enable this feature, the `allowTouchIdEnroll` desired capability must be set to true and the Simulator
must be [enrolled](https://support.apple.com/en-ca/ht201371).
When you set `allowTouchIdEnroll` to true, it will set the Simulator to be enrolled by default.
The enrollment state can be [toggled](/docs/en/commands/device/simulator/toggle-touch-id-enrollment.md)
This call will only work if Appium process or its parent application (e.g. Terminal.app or Appium.app) has access to Mac OS accessibility in System Preferences > Security & Privacy > Privacy > Accessibility list
example_usage:
java:
|
driver.performTouchID(false); // Simulates a failed touch
driver.performTouchID(true); // Simulates a passing touch
python:
|
self.driver.touch_id(false); # Simulates a failed touch
self.driver.touch_id(true); # Simulates a passing touch
javascript_wd:
|
await driver.touchId(false); // Simulates a failed touch
await driver.touchId(true); // Simulates a failed touch
javascript_wdio:
|
driver.touchId(false); // Simulates a failed touch
driver.touchId(true); // Simulates a passing touch
ruby:
|
@driver.touch_id(false) # Simulates a failed touch
@driver.touch_id(true) # Simulates a passing touch
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "http://appium.github.io/java-client/io/appium/java_client/ios/PerformsTouchID.html#performTouchID-boolean-"
python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L661"
javascript_wdio: "http://webdriver.io/api/mobile/touchId.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L3133"
ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/Ios/Device:touch_id"
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: false
android:
uiautomator2: false
uiautomator: false
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/simulator/touch_id
method: 'POST'
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: match
type: boolean
description: Are we simulating a successful touch (true) or a failed touch (false)
# 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
links:
- name: Appium Docs
url: https://github.com/appium/appium-xcuitest-driver/blob/master/docs/touch-id.md
@@ -0,0 +1,68 @@
---
name: Open Notifications
short_description: Open Android notifications (Emulator only)
example_usage:
java:
|
driver.openNotifications();
python:
|
self.driver.open_notifications();
javascript_wd:
|
await driver.openNotifications();
javascript_wdio:
|
driver.openNotifications();
ruby:
|
@driver.open_notifications();
php:
|
// TODO
csharp:
|
// TODO
client_docs:
java: "http://appium.github.io/java-client/io/appium/java_client/android/AndroidDriver.html#openNotifications--"
python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L676"
javascript_wdio: "http://webdriver.io/api/mobile/openNotifications.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L3004"
ruby: "https://github.com/appium/ruby_lib/blob/master/lib/appium_lib/core/common/command.rb#L18"
php: "https://github.com/appium/php-client/" # TODO
csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO
# 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: true
php: true
csharp: true
javascript_wd: true
javascript_wdio: true
# Information about the HTTP endpoints
endpoint:
url: /session/:session_id/appium/device/open_notifications
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#L408
@@ -0,0 +1,59 @@
---
name: Get System Bars
short_description: Retrieve visibility and bounds information of the status and navigation bars
example_usage:
java:
|
Map<String, String> systemBars = driver.getSystemBars();
ruby:
|
@driver.get_system_bars();
php:
|
// TODO
csharp:
|
// TODO
client_docs:
java: "http://appium.github.io/java-client/io/appium/java_client/android/HasDeviceDetails.html#getSystemBars--"
ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/Core/Device:get_system_bars"
php: "https://github.com/appium/php-client/" # TODO
csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO
# 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/system_bars
method: GET
url_parameters:
- name: session_id
description: ID of the session to route the command to
response:
- type: array<object>
description: Information about visibility and bounds of status and navigation bar
# 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
@@ -0,0 +1,71 @@
---
name: Get System Time
short_description: Get the time on the device
example_usage:
java:
|
String time = driver.getDeviceTime();
python:
|
time = self.driver.device_time()
javascript_wdio:
|
let time = driver.getDeviceTime();
javascript_wd:
|
let time = await driver.getDeviceTime();
ruby:
|
@driver.device_time
php:
|
// TODO
csharp:
|
// TODO
client_docs:
java: "http://appium.github.io/java-client/io/appium/java_client/HasDeviceTime.html#getDeviceTime--"
python: "https://github.com/appium/python-client/blob/master/appium/webdriver/webdriver.py#L798"
javascript_wdio: "http://webdriver.io/api/mobile/getDeviceTime.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L3119"
ruby: "https://github.com/appium/ruby_lib/blob/master/lib/appium_lib/core/common/command.rb#L13"
php: "https://github.com/appium/php-client/" # TODO
csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO
# 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/device/system_time
method: GET
url_parameters:
- name: session_id
description: ID of the session to route the command to
response:
- type: string
description: Time on the device
# 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
@@ -0,0 +1,73 @@
---
name: Clear Element
short_description: Clear an element's value
example_usage:
java:
|
MobileElement element = (MobileElement) driver.findElementByAccessibilityId("SomeAccessibilityID");
element.clear();
python:
|
self.driver.find_element_by_accessibility_id('SomeAccessibilityID').clear()
javascript_wd:
|
let element = await driver.elementByAccessibilityId("SomeAccessibilityID");
await element.clear();
javascript_wdio:
|
driver.clearElement("~SomeAccessibilityId");
ruby:
|
@driver.find_element(:accessibility_id, "SomeAccessibilityID").clear()
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/WebElement.html#clear--"
python: "http://selenium-python.readthedocs.io/api.html#selenium.webdriver.remote.webelement.WebElement.clear"
javascript_wdio: "http://webdriver.io/api/action/clearElement.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1780"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Element:clear"
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/element/:element_id/clear
method: 'POST'
url_parameters:
- name: session_id
description: ID of the session to route the command to
- name: element_id
description: ID of the element to clear.
# Links to specifications. Should link to at least one specification
specifications:
w3c: https://www.w3.org/TR/webdriver/#dfn-get-element-tag-name
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidclear
@@ -0,0 +1,79 @@
---
name: Click
short_description: Click element at its center point.
description:
>
Clicks element at its center point. If the element's center point is obscured by another element, an element click intercepted error is returned. If the element is outside the viewport, an element not interactable error is returned.
Not all drivers automatically scroll the element into view and may need to be scrolled to in order to interact with it.
example_usage:
java:
|
MobileElement el = driver.findElementByAccessibilityId("SomeId");
el.click();
python:
|
el = self.driver.find_element_by_accessibility_id('SomeId')
el.click();
javascript_wd:
|
let element = await driver.elementByAccessibilityId('id', 'SomeId');
await element.click();
javascript_wdio:
|
driver.click('#SomeId');
ruby:
|
@driver.find_element(:accessibility_id, 'SomeId').click
php:
|
// TODO
csharp:
|
// TODO
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/WebElement.html#click--"
python: "http://selenium-python.readthedocs.io/api.html#selenium.webdriver.remote.webelement.WebElement.click"
javascript_wdio: "http://webdriver.io/api/action/click.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1672"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Element#click-instance_method"
php: "https://github.com/appium/php-client/" # TODO
csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO
# 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/element/:element_id/click
method: 'POST'
url_parameters:
- name: session_id
description: UUID of the session
- name: element_id
description: UUID of the element
# Links to specifications. Should link to at least one specification
specifications:
w3c: https://www.w3.org/TR/webdriver/#element-click
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidclick
@@ -0,0 +1,83 @@
---
name: Send Keys
short_description: Send a sequence of key strokes to an element
description:
>
Any UTF-8 character may be specified, however, if the server does not support native key events, it should simulate key strokes for a standard US keyboard layout. The Unicode Private Use Area code points, 0xE000-0xF8FF, are used to represent pressable, non-text keys (see table below).
(See [Unicode document](/docs/en/writing-running-appium/other/unicode.md) for information on Unicode characters)
example_usage:
java:
|
MobileElement element = (MobileElement) driver.findElementByAccessibilityId("SomeAccessibilityID");
element.sendKeys("Hello world!");
python:
|
self.driver.find_element_by_accessibility_id('SomeAccessibilityID').send_keys('Hello world!')
javascript_wd:
|
let element = await driver.elementByAccessibilityId("SomeAccessibilityID");
await element.type("Hello world!")
javascript_wdio:
|
driver.setValue("~SomeAccessibilityId");
ruby:
|
@driver.find_element(:accessibility_id, "SomeAccessibilityID").send_keys("Hello World!")
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/WebElement.html#sendKeys-java.lang.CharSequence...-"
python: "http://selenium-python.readthedocs.io/api.html?highlight=active_element#selenium.webdriver.common.action_chains.ActionChains.send_keys"
javascript_wdio: "http://webdriver.io/api/action/setValue.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1700"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Element#send_keys-instance_method"
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/element/value
method: 'POST'
url_parameters:
- name: session_id
description: ID of the session to route the command to
- name: element_id
description: ID of the element to send keys to.
json_parameters:
- name: value
type: array<string>
description: The sequence of keys to type. An array must be provided. The server should flatten the array items to a single string to be typed.
# Links to specifications. Should link to at least one specification
specifications:
w3c: https://www.w3.org/TR/webdriver/#dfn-element-send-keys
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidvalue
@@ -0,0 +1,79 @@
---
name: Get Element Attribute
short_description: Get the value of an element's attribute
example_usage:
java:
|
List<MobileElement> element = (MobileElement) driver.findElementByAccessibilityId("SomeAccessibilityID");
String tagName = element.getAttribute("content-desc");
python:
|
tagName = self.driver.find_element_by_accessibility_id('SomeAccessibilityID').get_attribute('content-desc')
javascript_wd:
|
let element = await driver.elementByAccessibilityId("SomeAccessibilityID");
let tagName = await element.getAttribute("content-desc");
javascript_wdio:
|
let attribute = driver.getAttribute("~SomeAccessibilityId", "content-desc");
ruby:
|
@driver.find_element(:accessibility_id, 'SomeAccessibilityID').attribute("content-desc")
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/WebElement.html#getAttribute"
python: "http://selenium-python.readthedocs.io/api.html#selenium.webdriver.remote.webelement.WebElement.get_attribute"
javascript_wdio: "http://webdriver.io/api/property/getAttribute.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1350"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium%2FWebDriver%2FElement:attribute"
php: "https://github.com/appium/php-client/" # TODO PHP documentation link
csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link
# TODO: Confirm if all the drivers support this
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/elements/:element_id/attribute/:name
method: 'GET'
url_parameters:
- name: session_id
description: ID of the session to route the command to
- name: element_id
description: ID of the element to get the attribute from
- name: name
description: The name of the attribute
response:
- type: string
description: The value of the attribute or null if not set
# Links to specifications. Should link to at least one specification
specifications:
w3c: https://www.w3.org/TR/webdriver/#dfn-get-element-attribute
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidattributename
@@ -0,0 +1,85 @@
---
name: Get Element CSS Value
short_description: Query the value of a web element's computed CSS property
description:
|
The CSS property to query should be specified using the CSS property name, not the JavaScript property name (e.g. background-color instead of backgroundColor).
This command only applies to webview contexts
example_usage:
java:
|
List<MobileElement> element = (MobileElement) driver.findElementById("SomeId");
String cssProperty = element.getCssValue("style");
python:
|
cssProperty = self.driver.find_element_by_accessibility_id('SomeId').value_of_css_property("style")
javascript_wd:
|
let element = await driver.elementById("SomeId");
let cssProperty = await element.getComputedCss();
javascript_wdio:
|
let cssProperty = driver.getCssProperty("~SomeId", "style");
ruby:
|
@driver.find_element(:id, 'SomeId').css_value
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/WebElement.html#getCssValue--"
python: "http://selenium-python.readthedocs.io/api.html#selenium.webdriver.remote.webelement.WebElement.value_of_css_property"
javascript_wdio: "http://webdriver.io/api/property/getCssProperty.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1447"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Element:css_value"
php: "https://github.com/appium/php-client/" # TODO PHP documentation link
csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link
# TODO: Confirm if all the drivers support this
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/elements/:element_id/css/:property_name
method: GET
url_parameters:
- name: session_id
description: ID of the session to route the command to
- name: element_id
description: ID of the element to get the property from
- name: property_name
description: Name of the CSS property
response:
- type: string
description: Value of the CSS property
# Links to specifications. Should link to at least one specification
specifications:
w3c: https://www.w3.org/TR/webdriver/#dfn-get-element-css-value
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidcsspropertyname
@@ -0,0 +1,77 @@
---
name: Is Element Displayed
short_description: Determine if an element is currently displayed
example_usage:
java:
|
MobileElement element = (MobileElement) driver.findElementByAccessibilityId("SomeAccessibilityID");
boolean isDisplayed = element.isDisplayed();
python:
|
self.driver.find_element_by_accessibility_id('SomeAccessibilityID').is_displayed()
javascript_wd:
|
let element = await driver.elementByAccessibilityId("SomeAccessibilityID");
let isDisplayed = await element.isDisplayed();
# Note that elementIdDisplayed is not a typo in this document, it's a WDIO typo
javascript_wdio:
|
let isDisplayed = driver.elementIdDisplayed("~SomeAccessibilityId");
ruby:
|
@driver.find_element(:accessibility_id, "SomeAccessibilityID").displayed?()
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/WebElement.html#isDisplayed--"
python: "http://selenium-python.readthedocs.io/api.html#selenium.webdriver.remote.webelement.WebElement.is_displayed"
javascript_wdio: "http://webdriver.io/api/protocol/elementIdDisplayed.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1370"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium%2FWebDriver%2FElement:displayed%3F"
php: "https://github.com/appium/php-client/" # TODO PHP documentation link
csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link
# TODO: Confirm support for these per 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/element/:element_id/displayed
method: 'GET'
url_parameters:
- name: session_id
description: ID of the session to route the command to
- name: element_id
description: ID of the element to check if it is displayed
response:
- type: boolean
description: Whether the element is displayed
# Links to specifications. Should link to at least one specification
specifications:
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementiddisplayed
@@ -0,0 +1,76 @@
---
name: Is Element Enabled
short_description: Determine if an element is currently enabled
example_usage:
java:
|
MobileElement element = (MobileElement) driver.findElementByAccessibilityId("SomeAccessibilityID");
boolean isEnabled = element.isEnabled();
python:
|
self.driver.find_element_by_accessibility_id('SomeAccessibilityID').is_enabled()
javascript_wd:
|
let element = await driver.elementByAccessibilityId("SomeAccessibilityID");
let isEnabled = await element.isEnabled();
javascript_wdio:
|
let isEnabled = driver.isEnabled("~SomeAccessibilityId");
ruby:
|
@driver.find_element(:accessibility_id, "SomeAccessibilityID").enabled?()
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/WebElement.html#isEnabled---"
python: "http://selenium-python.readthedocs.io/api.html#selenium.webdriver.remote.webelement.WebElement.is_enabled"
javascript_wdio: "http://webdriver.io/api/state/isEnabled.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1386"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Element#enabled%3F-instance_method"
php: "https://github.com/appium/php-client/" # TODO PHP documentation link
csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link
# TODO: Confirm support for these per 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/element/:element_id/enabled
method: 'GET'
url_parameters:
- name: session_id
description: ID of the session to route the command to
- name: element_id
description: ID of the element to check if it is enabled
response:
- type: boolean
description: Whether the element is enabled
# Links to specifications. Should link to at least one specification
specifications:
w3c: https://www.w3.org/TR/webdriver/#dfn-is-element-enabled
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidenabled
@@ -0,0 +1,59 @@
---
name: Get Element Location in View
short_description: Determine an element's location on the screen once it has been scrolled into view (mainly an internal command and not supported by all clients)
example_usage:
javascript_wd:
|
let element = await driver.elementByAccessibilityId("SomeAccessibilityID");
let location = await element.getLocationInView();
javascript_wdio:
|
let location = driver.getLocationInView("~SomeAccessibilityId");
client_docs:
javascript_wdio: "http://webdriver.io/api/property/getLocationInView.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2189"
# TODO: Confirm if all the drivers support this
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/elements/:element_id/location_in_view
method: GET
url_parameters:
- name: session_id
description: ID of the session to route the command to
- name: element_id
description: ID of the element to get the location-in-view of
response:
- name: x
type: number
description: X coordinate
- name: y
type: number
description: Y coordinate
# Links to specifications. Should link to at least one specification
specifications:
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidlocation_in_view
@@ -0,0 +1,82 @@
---
name: Get Element Location
short_description: Determine an element's location on the page or screen
description: The point (0, 0) refers to the upper-left corner of the page. The element's coordinates are returned as a JSON object with x and y properties
example_usage:
java:
|
List<MobileElement> element = (MobileElement) driver.findElementByAccessibilityId("SomeAccessibilityID");
Point location = element.getLocation();
python:
|
location = self.driver.find_element_by_accessibility_id('SomeAccessibilityID').location
javascript_wd:
|
let element = await driver.elementByAccessibilityId("SomeAccessibilityID");
let location = await element.getLocation();
javascript_wdio:
|
let location = driver.getLocation("~SomeAccessibilityId");
ruby:
|
@driver.find_element(:accessibility_id, 'SomeAccessibilityID').location
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/WebElement.html#getLocation--"
python: "http://selenium-python.readthedocs.io/api.html#selenium.webdriver.remote.webelement.WebElement.location"
javascript_wdio: "http://webdriver.io/api/property/getLocation.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2175"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Element:location"
php: "https://github.com/appium/php-client/" # TODO PHP documentation link
csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link
# TODO: Confirm if all the drivers support this
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/elements/:element_id/location
method: GET
url_parameters:
- name: session_id
description: ID of the session to route the command to
- name: element_id
description: ID of the element to get the location of
response:
- name: x
type: number
description: X coordinate
- name: y
type: number
description: Y coordinate
# Links to specifications. Should link to at least one specification
specifications:
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidlocation
@@ -0,0 +1,77 @@
---
name: Get Tag Name
short_description: Get an element's tag name
example_usage:
java:
|
List<MobileElement> element = (MobileElement) driver.findElementByAccessibilityId("SomeAccessibilityID");
String tagName = element.getTagName();
python:
|
tagName = self.driver.find_element_by_accessibility_id('SomeAccessibilityID').tag_name
javascript_wd:
|
let element = await driver.elementByAccessibilityId("SomeAccessibilityID");
let tagName = await element.getTagName();
javascript_wdio:
|
let tagName = driver.getTagName("~SomeAccessibilityId");
ruby:
|
@driver.find_element(:accessibility_id, 'SomeAccessibilityID').tag_name
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/WebElement.html#getTagName--"
python: "http://selenium-python.readthedocs.io/api.html#selenium.webdriver.remote.webelement.WebElement.tag_name"
javascript_wdio: "http://webdriver.io/api/property/getTagName.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1336"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Element#tag_name-instance_method"
php: "https://github.com/appium/php-client/" # TODO PHP documentation link
csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link
# TODO: Confirm if all the drivers support this
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/elements/:element_id/name
method: 'GET'
url_parameters:
- name: session_id
description: ID of the session to route the command to
- name: element_id
description: ID of the element to get the name from
response:
- type: string
description: The tag name of the element
# Links to specifications. Should link to at least one specification
specifications:
w3c: https://www.w3.org/TR/webdriver/#dfn-get-element-tag-name
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidname
@@ -0,0 +1,77 @@
---
name: Get Tag Name
short_description: Get an element's tag name
example_usage:
java:
|
MobileElement element = (MobileElement) driver.findElementByAccessibilityId("SomeAccessibilityID");
String tagName = element.getTagName();
python:
|
tagName = self.driver.find_element_by_accessibility_id('SomeAccessibilityID').tag_name
javascript_wd:
|
let element = await driver.elementByAccessibilityId("SomeAccessibilityID");
let tagName = await element.getTagName();
javascript_wdio:
|
let tagName = driver.getTagName("~SomeAccessibilityId");
ruby:
|
@driver.find_element(:accessibility_id, 'SomeAccessibilityID').tag_name
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/WebElement.html#getTagName--"
python: "http://selenium-python.readthedocs.io/api.html#selenium.webdriver.remote.webelement.WebElement.tag_name"
javascript_wdio: "http://webdriver.io/api/property/getTagName.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1336"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Element#tag_name-instance_method"
php: "https://github.com/appium/php-client/" # TODO PHP documentation link
csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link
# TODO: Confirm if all the drivers support this
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/elements/:element_id/name
method: 'GET'
url_parameters:
- name: session_id
description: ID of the session to route the command to
- name: element_id
description: ID of the element to get the name from
response:
- type: string
description: The tag name of the element
# Links to specifications. Should link to at least one specification
specifications:
w3c: https://www.w3.org/TR/webdriver/#dfn-get-element-tag-name
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidname
@@ -0,0 +1,76 @@
---
name: Get Element Rect
short_description: Gets dimensions and coordinates of an element
example_usage:
java:
|
List<MobileElement> element = (MobileElement) driver.findElementByAccessibilityId("SomeAccessibilityID");
Rectangle rect = element.getRect();
javascript_wd:
|
let element = await driver.elementByAccessibilityId("SomeAccessibilityID");
let rect = await element.getRect();
javascript_wdio:
|
let rect = driver.elementIdRect("~SomeAccessibilityId");
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/WebElement.html#getRect--"
javascript_wdio: "http://webdriver.io/api/protocol/elementIdRect.html"
php: "https://github.com/appium/php-client/" # TODO PHP documentation link
csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link
# TODO: Confirm if all the drivers support this
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/elements/:element_id/rect
method: GET
url_parameters:
- name: session_id
description: ID of the session to route the command to
- name: element_id
description: ID of the element to get the rect of
response:
- name: x
type: number
description: X coordinate
- name: y
type: number
description: Y coordinate
- name: height
type: number
description: Height of the bounding rectangle
- name: weight
type: number
description: Width of the bounding rectangle
# Links to specifications. Should link to at least one specification
specifications:
w3c: https://www.w3.org/TR/webdriver/#dfn-get-element-rect
@@ -0,0 +1,78 @@
---
name: Get Element Text
short_description: Returns visible text for element
description:
>
Returns the visible text for the element.
example_usage:
java:
|
MobileElement element = (MobileElement) driver.findElementByClassName("SomeClassName");
let elText = element.getText();
python:
|
# el = self.driver.find_element_by_accessibility_id('SomeId')
# TODO: Python example
javascript_wd:
|
let element = await driver.elementByAccessibilityId("SomeAccessibilityID");
await element.submit();
javascript_wdio:
|
driver.getText("~SomeAccessibilityId");
ruby:
|
# TODO Ruby sample
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/WebElement.html#getText--"
python: "http://selenium-python.readthedocs.io/api.html" # TODO Python documentation link
javascript_wdio: "http://webdriver.io/api/property/getText.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1832"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/" # TODO Ruby documentation link
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/element/:element_id/value
method: 'POST'
url_parameters:
- name: session_id
description: ID of the session to route the command to
- name: element_id
description: ID of the element to get the text from
# Links to specifications. Should link to at least one specification
specifications:
w3c: https://www.w3.org/TR/webdriver/#dfn-get-element-text
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidvalue
@@ -0,0 +1,76 @@
---
name: Is Element Selected
short_description: Determine if a form or form-like element (checkbox, select, etc...) is selected
example_usage:
java:
|
MobileElement element = (MobileElement) driver.findElementByAccessibilityId("SomeAccessibilityID");
boolean isSelected = element.isSelected();
python:
|
self.driver.find_element_by_accessibility_id('SomeAccessibilityID').is_selected()
javascript_wd:
|
let element = await driver.elementByAccessibilityId("SomeAccessibilityID");
let isSelected = await element.isSelected();
javascript_wdio:
|
let isSelected = driver.isSelected("~SomeAccessibilityId");
ruby:
|
@driver.find_element(:accessibility_id, "SomeAccessibilityID").selected?()
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/WebElement.html#isSelected--"
python: "http://selenium-python.readthedocs.io/api.html#selenium.webdriver.remote.webelement.WebElement.is_selected"
javascript_wdio: "http://webdriver.io/api/state/isSelected.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1402"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Element#selected%3F-instance_method"
php: "https://github.com/appium/php-client/" # TODO PHP documentation link
csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link
# TODO: Confirm support for these per 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/element/:element_id/selected
method: 'GET'
url_parameters:
- name: session_id
description: ID of the session to route the command to
- name: element_id
description: ID of the element to check if it is selected
response:
- type: boolean
description: Whether the element is selected
# Links to specifications. Should link to at least one specification
specifications:
w3c: https://www.w3.org/TR/webdriver/#dfn-is-element-selected
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidselected
@@ -0,0 +1,82 @@
---
name: Get Element Size
short_description: Determine an element's size in pixels
description: The size will be returned as an object with width and height properties.
example_usage:
java:
|
List<MobileElement> element = (MobileElement) driver.findElementByAccessibilityId("SomeAccessibilityID");
Dimension elementSize = element.getSize();
python:
|
size = self.driver.find_element_by_accessibility_id('SomeAccessibilityID').size
javascript_wd:
|
let element = await driver.elementByAccessibilityId("SomeAccessibilityID");
let size = await element.getSize();
javascript_wdio:
|
let size = driver.getElementSize("~SomeAccessibilityId");
ruby:
|
@driver.find_element(:accessibility_id, 'SomeAccessibilityID').size
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/WebElement.html#getSize--"
python: "http://selenium-python.readthedocs.io/api.html#selenium.webdriver.remote.webelement.WebElement.size"
javascript_wdio: "http://webdriver.io/api/property/getElementSize.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2203"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Element:size"
php: "https://github.com/appium/php-client/" # TODO PHP documentation link
csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link
# TODO: Confirm if all the drivers support this
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/elements/:element_id/size
method: GET
url_parameters:
- name: session_id
description: ID of the session to route the command to
- name: element_id
description: ID of the element to get the size of
response:
- name: width
type: number
description: Width of the element
- name: height
type: number
description: Height of the element
# Links to specifications. Should link to at least one specification
specifications:
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidsize
@@ -0,0 +1,78 @@
---
name: Get Element Text
short_description: Returns visible text for element
description:
>
Returns the visible text for the element.
example_usage:
java:
|
MobileElement element = (MobileElement) driver.findElementByClassName("SomeClassName");
let elText = element.getText();
python:
|
# el = self.driver.find_element_by_accessibility_id('SomeId')
# TODO: Python example
javascript_wd:
|
let element = await driver.elementByAccessibilityId("SomeAccessibilityID");
await element.submit();
javascript_wdio:
|
driver.getText("~SomeAccessibilityId");
ruby:
|
# TODO Ruby sample
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/WebElement.html#getText--"
python: "http://selenium-python.readthedocs.io/api.html" # TODO Python documentation link
javascript_wdio: "http://webdriver.io/api/property/getText.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1832"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/" # TODO Ruby documentation link
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/element/:element_id/text
method: 'GET'
url_parameters:
- name: session_id
description: ID of the session to route the command to
- name: element_id
description: ID of the element to get the text from
# Links to specifications. Should link to at least one specification
specifications:
w3c: https://www.w3.org/TR/webdriver/#dfn-get-element-text
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidtext
@@ -0,0 +1,86 @@
---
name: Find Element
short_description: Search for an element on the page
description:
>
Get the first element that matches a locator [strategy](/docs/en/commands/element/find-elements#selector-strategies)
example_usage:
java:
|
MobileElement elementOne = (MobileElement) driver.findElementByAccessibilityId("SomeAccessibilityID");
MobileElement elementTwo = (MobileElement) driver.findElementByClassName("SomeClassName");
python:
|
el = self.driver.find_element_by_accessibility_id('SomeAccessibilityID')
javascript_wd:
|
let elementOne = await driver.elementByAccessibilityId("SomeAccessibilityID");
let elementTwo = await driver.element("id", "SomeID");
javascript_wdio:
|
driver.element("~SomeAccessibilityId");
ruby:
|
@driver.find_element(:accessibility_id, 'SomeAccessibilityID')
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/WebElement.html#findElement-org.openqa.selenium.By-"
python: "http://selenium-python.readthedocs.io/api.html#selenium.webdriver.remote.webdriver.WebDriver.find_element"
javascript_wdio: "http://webdriver.io/api/protocol/element.html#Usage"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L745"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/SearchContext:find_element"
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/element
method: 'POST'
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: using
type: string
description: The locator strategy to use
- name: value
type: string
description: The search target
response:
- name: ELEMENT
type: object
description: A JSON object for the located element
# Links to specifications. Should link to at least one specification
specifications:
w3c: https://www.w3.org/TR/webdriver/#find-element
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelement
@@ -0,0 +1,99 @@
---
name: Find Elements
short_description: Search for multiple elements
description:
>
Get a list of elements that match the [locator selector](/docs/en/about-appium/getting-started.md).
selector_strategies:
- name: Accessibility ID
description: Read a unique identifier for a UI element. For XCUITest it is the element's `resource-id` attribute. For Android it is the element's `content-desc` attribute.
- name: Class name
description: "For IOS it is the full name of the XCUI element and begins with XCUIElementType. For Android it is the full name of the UIAutomator2 class (e.g.: android.widget.TextView)"
- name: ID
description: Native element identifier. `resource-id` for android; `name` for iOS.
- name: Name
description: Name of element
- name: XPath
description: Search the app XML source using xpath (not recommended, has performance issues)
- name: Android UiAutomator
description: Use the UI Automator API, in particular the [UiSelector](https://developer.android.com/reference/android/support/test/uiautomator/UiSelector.html) class to locate elements. In Appium you send the Java code, as a string, to the server, which executes it in the application’s environment, returning the element or elements.
- name: IOS UIAutomation
description: When automating an iOS application, Apple’s [Instruments](/docs/en/drivers/ios-uiautomation.md) framework can be used to find elements
example_usage:
java:
|
List<MobileElement> elementsOne = (MobileElement) driver.findElementsByAccessibilityId("SomeAccessibilityID");
List<MobileElement> elementsTwo = (MobileElement) driver.findElementsByClassName("SomeClassName");
python:
|
el = self.driver.find_elements_by_accessibility_id('SomeAccessibilityID')
javascript_wd:
|
let elementsOne = await driver.elementsByAccessibilityId("SomeAccessibilityID");
let elementsTwo = await driver.elements("id", "SomeID");
javascript_wdio:
|
driver.elements("~SomeAccessibilityId");
ruby:
|
@driver.find_elements("~SomeAccessibilityID")
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/WebElement.html#findElements-org.openqa.selenium.By-"
python: "http://selenium-python.readthedocs.io/api.html#selenium.webdriver.remote.webdriver.WebDriver.find_elements"
javascript_wdio: "http://webdriver.io/api/protocol/elements.html#Usage"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L798"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/SearchContext:find_elements"
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/elements
method: 'POST'
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: using
type: string
description: The locator strategy to use
- name: value
type: string
description: The search target
response:
- type: Array<String>
description: A list of of JSON objects for the located elements
# Links to specifications. Should link to at least one specification
specifications:
w3c: https://www.w3.org/TR/webdriver/#dfn-find-elements
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelements
@@ -0,0 +1,71 @@
---
name: Get Active Element
short_description: Gets the active element of the current session
example_usage:
java:
|
WebElement currentElement = driver.switchTo().activeElement();
python:
|
element = driver.switch_to.active_element
javascript_wd:
|
let element = await driver.active();
javascript_wdio:
|
driver.elementActive();
ruby:
|
# TODO Ruby example
php:
|
// TODO PHP example
csharp:
|
// TODO C# example
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/WebDriver.TargetLocator.html#activeElement--"
python: "http://selenium-python.readthedocs.io/api.html?highlight=active_element#selenium.webdriver.remote.webdriver.WebDriver.switch_to_active_element" # TODO
javascript_wdio: "http://webdriver.io/api/protocol/elementActive.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1934"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/" # TODO
php: "https://github.com/appium/php-client/" # TODO
csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO
# Driver support by platform
driver_support:
ios:
xcuitest: false
uiautomation: false
android:
uiautomator2: false
uiautomator: false
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: /wd/hub/session/:session_id/element/active
method: 'POST'
response:
- name: ELEMENT
type: object
description: A JSON object for the located element
# Links to specifications. Should link to at least one specification
specifications:
w3c: https://www.w3.org/TR/webdriver/#get-active-element
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementactive
@@ -0,0 +1,82 @@
---
name: Are Elements Equal
short_description: Test if two element IDs refer to the same element
# TODO: I'm not sure if all the clients support this method or not.
example_usage:
java:
|
// Overrides the Java Object .equals method
MobileElement elementOne = (MobileElement) driver.findElementByClassName("SomeClassName");
MobileElement elementTwo = (MobileElement) driver.findElementByClassName("SomeOtherClassName");
boolean isEqual = elementOne.equals(elementTwo);
python:
|
# TODO Python sample
javascript_wd:
|
let elementOne = await driver.elementByClassName("someClass");
let elementTwo = await driver.elementByClassName("someOtherClass");
let isEqual = await elementOne.equalsElement(elementTwo);
javascript_wdio:
|
# TODO WDIO example
ruby:
|
# TODO Ruby example
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "https://appium.github.io/java-client/io/appium/java_client/MobileElement.html"
python: "http://selenium-python.readthedocs.io/api.html" # TODO Python documentation link
javascript_wdio: "http://webdriver.io/api/state/isEnabled.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1463"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Element#enabled%3F-instance_method"
php: "https://github.com/appium/php-client/" # TODO PHP documentation link
csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link
# TODO: Confirm support for these per 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/element/:element_id/equals/:other_element_id
method: 'GET'
url_parameters:
- name: session_id
description: ID of the session to route the command to
- name: element_id
description: ID of the element
- name: element_id
description: ID of the other element to check if they're equal
response:
- type: boolean
description: Whether the two ID's refer to the same element
# Links to specifications. Should link to at least one specification
specifications:
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidequalsother
@@ -0,0 +1,77 @@
---
name: Submit Form
short_description: Submit a FORM element
description:
>
The submit command may also be applied to any element that is a descendant of a FORM element (Web only)
example_usage:
java:
|
MobileElement element = (MobileElement) driver.findElementByClassName("SomeClassName");
element.submit();
python:
|
el = self.driver.find_element_by_accessibility_id('SomeAccessibilityID')
el.submit();
javascript_wd:
|
let element = await driver.elementByAccessibilityId("SomeAccessibilityID");
await element.submit();
javascript_wdio:
|
driver.submitForm("~SomeAccessibilityId");
ruby:
|
# TODO Ruby sample
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/WebElement.html#submit--"
python: "http://selenium-python.readthedocs.io/api.html#selenium.webdriver.remote.webelement.WebElement.submit"
javascript_wdio: "http://webdriver.io/api/action/submitForm.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1741"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/" # TODO Ruby documentation link
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: false
uiautomator: false
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/element/:element_id/submit
method: 'POST'
url_parameters:
- name: session_id
description: ID of the session to route the command to
- name: element_id
description: ID of the element to submit
# Links to specifications. Should link to at least one specification
specifications:
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidsubmit
+100
View File
@@ -0,0 +1,100 @@
---
name: 'Template'
short_description: Brief description
description:
>
An indepth description
of what this command does
example_usage:
java:
|
MobileElement el = driver.findElementByAccessibilityId("SomeId");
el.click();
python:
|
el = self.driver.find_element_by_accessibility_id('SomeId')
el.click();
javascript_wd:
|
await driver.status();
javascript_wdio:
|
await driver.status();
ruby:
|
# Ruby Code here
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:
platform_min: '1.2'
platform_max: '9.3'
appium_min: '1.7'
appium_max: '1.9'
driver_min: '1.1'
driver_max: '9.9'
uiautomation:
platform_min: '1.0'
android:
uiautomator2:
platform_min: '8.0'
uiautomator: true
mac:
mac:
platform_min: '?' # TODO
client_support:
java:
min: 1.2
max: 2.1
python:
min: 2
ruby: true # If true, means it supports all
php: false # If false(y), means it is not supported
# Information about the HTTP endpoints
endpoint:
url: /wd/hub/session/:session_id/element/:element_id/click
method: 'POST'
url_parameters:
- name: session_id
description: ID of the session
- name: element_id
description: ID of the element to blah blah blah
json_parameters:
- name: item
type: Object
description: Description of Item
- name: item.1 # Use dot notation for nested items
type: String # Type is optional
description: Item One description
response:
- name: build.version # Use dot notation for nested JSON parameters
type: string # JS type
description: A generic release label (i.e. "2.0rc3")
# Links to specifications. Should link to at least one specification
specifications:
w3c: https://www.w3.org/TR/webdriver/#element-click
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidclick
# Other relevant links
links:
- name: Google
url: http://www.google.com
@@ -0,0 +1,86 @@
---
name: Button Down
short_description: Click and hold the left mouse button at the current mouse coordinates
description:
|
Note that the next mouse-related command that should follow is buttonup . Any other mouse command (such as click or another call to buttondown) will yield undefined behavior
example_usage:
java:
|
Actions action = new Actions(driver);
action.moveTo(element);
action.clickAndHold();
action.perform();
python:
|
actions = ActionChains(driver)
actions.move_to_element(element)
actions.click_and_hold()
actions.perform()
javascript_wd:
|
await driver.moveTo(element);
await driver.buttonDown();
javascript_wdio:
|
driver.moveTo(element)
.buttonDown();
ruby:
|
@driver.action.move_to(element).click_and_hold.perform
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/interactions/Actions.html#clickAndHold--"
python: "http://selenium-python.readthedocs.io/api.html#selenium.webdriver.common.action_chains.ActionChains.click_and_hold"
javascript_wdio: "http://webdriver.io/api/protocol/buttonDown.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1625"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/ActionBuilder:click_and_hold"
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: false
uiautomator: false
mac:
mac: true # TODO Confirm this that mouse movements
windows:
windows: true # TODO Confirm this
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/buttondown
method: POST
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: button
type: number
description: Which button, {LEFT = 0, MIDDLE = 1 , RIGHT = 2}. Defaults to the left mouse button if not specified
# Links to specifications. Should link to at least one specification
specifications:
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidbuttondown
@@ -0,0 +1,94 @@
---
name: Button Up
short_description: Releases the mouse button previously held
description:
|
Must be called once for every buttondown command issued. See the note in click and buttondown about implications of out-of-order commands.
example_usage:
java:
|
Actions action = new Actions(driver);
action.moveTo(element);
action.clickAndHold();
action.moveTo(element, 10, 10);
action.release();
action.perform();
python:
|
actions = ActionChains(driver)
actions.move_to_element(element)
actions.click_and_hold()
actions.move_to_element(element, 10, 10)
action.release();
actions.perform()
javascript_wd:
|
await driver.moveTo(element);
await driver.buttonDown();
await driver.moveTo(element, 10, 10);
await driver.buttonUp();
javascript_wdio:
|
driver.moveTo(element)
.buttonDown()
.moveTo(element, 10, 10)
.buttonUp();
ruby:
|
@driver.action.click_and_hold(el).move_to(el, 10, 10).release.perform
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/interactions/Actions.html#clickAndHold--"
python: "http://selenium-python.readthedocs.io/api.html#selenium.webdriver.common.action_chains.ActionChains.release"
javascript_wdio: "http://webdriver.io/api/protocol/buttonUp.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1645"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/ActionBuilder:release"
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: false
uiautomator: false
mac:
mac: true # TODO Confirm this that mouse movements
windows:
windows: true # TODO Confirm this
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/buttonup
method: POST
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: button
type: number
description: Which button, {LEFT = 0, MIDDLE = 1 , RIGHT = 2}. Defaults to the left mouse button if not specified
# Links to specifications. Should link to at least one specification
specifications:
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidbuttonup
@@ -0,0 +1,82 @@
---
name: Click
short_description: Click any mouse button at the current mouse coordinates
example_usage:
java:
|
Actions action = new Actions(driver);
action.moveTo(element);
action.click();
action.perform();
python:
|
actions = ActionChains(driver)
actions.move_to_element(element)
actions.click()
actions.perform()
javascript_wd:
|
await driver.moveTo(element);
await driver.click();
javascript_wdio:
|
driver.moveTo(element)
.click();
ruby:
|
@driver.action.move_to(element).click.perform
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/interactions/Actions.html#click--"
python: "http://selenium-python.readthedocs.io/api.html#selenium.webdriver.common.action_chains.ActionChains.click"
javascript_wdio: "http://webdriver.io/api/action/click.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1665"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Mouse:click"
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: false
uiautomator: false
mac:
mac: true # TODO Confirm this that mouse movements
windows:
windows: true # TODO Confirm this
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/click
method: POST
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: button
type: number
description: Which button, {LEFT = 0, MIDDLE = 1 , RIGHT = 2}. Defaults to the left mouse button if not specified
# Links to specifications. Should link to at least one specification
specifications:
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidclick
@@ -0,0 +1,78 @@
---
name: Click
short_description: Double-clicks at the current mouse coordinates (set by moveto).
example_usage:
java:
|
Actions action = new Actions(driver);
action.moveTo(element);
action.doubleClick();
action.perform();
python:
|
actions = ActionChains(driver)
actions.move_to_element(element)
actions.double_click()
actions.perform()
javascript_wd:
|
await driver.moveTo(element);
await driver.doubleclick();
javascript_wdio:
|
driver.moveTo(element)
.doubleClick();
ruby:
|
@driver.action.move_to(element).double_click.perform
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/interactions/Actions.html#doubleClick--"
python: "http://selenium-python.readthedocs.io/api.html#selenium.webdriver.common.action_chains.ActionChains.double_click"
javascript_wdio: "http://webdriver.io/api/action/doubleClick.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1686"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/ActionBuilder:double_click"
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: false
uiautomator: false
mac:
mac: true # TODO Confirm this that mouse movements
windows:
windows: true # TODO Confirm this
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/doubledoubleClick
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/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessioniddoubledoubleClick
@@ -0,0 +1,90 @@
---
name: Move Mouse To
short_description: Move the mouse by an offset of the specificed element
description:
|
If no element is specified, the move is relative to the current mouse cursor. If an element is provided but no offset, the mouse will be moved to the center of the element. If the element is not visible, it will be scrolled into view.
example_usage:
java:
|
Actions action = new Actions(driver);
action.moveTo(element, 10, 10);
action.perform()
python:
|
actions = ActionChains(driver)
actions.move_to(element, 10, 10)
actions.perform()
javascript_wd:
|
await driver.moveTo(element, 10, 10);
javascript_wdio:
|
driver.moveTo(element, 10, 10);
ruby:
|
@driver.mouse.move_to(element)
@driver.mouse.move_to(element, 5, 5)
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/interactions/Actions.html#moveToElement-org.openqa.selenium.WebElement-"
python: "http://selenium-python.readthedocs.io/api.html#selenium.webdriver.common.action_chains.ActionChains.move_to_element"
javascript_wdio: "http://webdriver.io/api/protocol/moveTo.html#description"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1600"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Mouse:move_to"
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: false
uiautomator: false
mac:
mac: true # TODO Confirm this that mouse movements
windows:
windows: true # TODO Confirm this
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/moveto
method: POST
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: element
type: string
description: The ID of the element to move to. If not specified, relative to mouse position
- name: xoffset
type: number
description: X offset to move to, relative to the top-left corner of the element. If not specified, the mouse will move to the middle of the element
- name: yoffset
type: number
description: Y offset to move to, relative to the top-left corner of the element. If not specified, the mouse will move to the middle of the element
# Links to specifications. Should link to at least one specification
specifications:
w3c: https://drafts.csswg.org/cssom-view/#dom-window-moveto
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#post-sessionsessionidmoveto
@@ -0,0 +1,80 @@
---
name: Double Tap
short_description: Double tap on the touch screen using finger motion events
example_usage:
java:
|
TouchActions action = new TouchActions(driver);
action.doubleTap(element);
action.perform();
python:
|
actions = TouchActions(driver)
actions.double_tap(element)
actions.perform()
javascript_wd:
|
// Using tapElement method
await driver.tapElement(elementOne);
// Using touch actions
let action = new wd.TouchAction();
action.tap({el: element});
action.perform();
await driver.performTouchAction(action);
ruby:
|
@driver.touch_action.double_tap(element).perform
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/interactions/touch/TouchActions.html#doubleTap-org.openqa.selenium.WebElement-"
python: "https://seleniumhq.github.io/selenium/docs/api/py/webdriver/selenium.webdriver.common.touch_actions.html#selenium.webdriver.common.touch_actions.TouchActions.double_tap"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L425"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium%2FWebDriver%2FTouchActionBuilder:double_tap"
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: false
uiautomator: false
mac:
mac: true # TODO Confirm this that mouse movements
windows:
windows: true # TODO Confirm this
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/touch/doubleclick
method: POST
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: element
type: number
description: ID of the element to double tap on
# Links to specifications. Should link to at least one specification
specifications:
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidtouchdoubleclick
@@ -0,0 +1,88 @@
---
name: Tap
short_description: Flick on the touch screen using finger motion events
example_usage:
java:
|
TouchActions action = new TouchActions(driver);
action.flick(element, 1, 10, 10);
action.perform();
python:
|
actions = TouchActions(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);
ruby:
|
@driver.touch_action.flick(element, 1, 10, 10).perform
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/interactions/touch/TouchActions.html#flick-org.openqa.selenium.WebElement-int-int-int-"
python: "https://seleniumhq.github.io/selenium/docs/api/py/webdriver/selenium.webdriver.common.touch_actions.html#selenium.webdriver.common.touch_actions.TouchActions.flick_element"
javascript_wdio: "http://webdriver.io/api/protocol/touchFlick.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1513"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium%2FWebDriver%2FTouchActionBuilder:flick"
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 # TODO Confirm this that mouse movements
windows:
windows: true # TODO Confirm this
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/touch/flick
method: POST
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: element
type: string
description: ID of the element where the flick starts
- name: xoffset
type: number
description: The x offset in pixels to flick by
- name: yoffset
type: number
description: The y offset in pixels to flick by
- name: speed
type: number
description: The speed in pixels per seconds
# Links to specifications. Should link to at least one specification
specifications:
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidtouchflick
@@ -0,0 +1,87 @@
---
name: Long Tap
short_description: Long press on the touch screen using finger motion events
example_usage:
java:
|
TouchActions action = new TouchActions(driver);
action.longPress(element);
action.perform();
python:
|
actions = TouchActions(driver)
actions.long_press(element)
actions.perform()
javascript_wd:
|
// Using touch actions
let action = new wd.TouchAction();
action.longPress({el: element});
action.perform();
await driver.performTouchAction(action);
javascript_wdio:
|
driver.touchPerform({
action: 'longPress',
options: {
element: element
}
});
ruby:
|
@driver.touch_action.long_press(element).perform
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/interactions/touch/TouchActions.html#longPress-org.openqa.selenium.WebElement-"
python: "https://seleniumhq.github.io/selenium/docs/api/py/webdriver/selenium.webdriver.common.touch_actions.html#selenium.webdriver.common.touch_actions.TouchActions.long_press"
javascript_wdio: "http://webdriver.io/api/mobile/touchPerform.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1531"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium%2FWebDriver%2FTouchActionBuilder:long_press"
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 # TODO Confirm this that mouse movements
windows:
windows: true # TODO Confirm this
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/touch/longclick
method: POST
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: element
type: number
description: ID of the element to double tap on
# Links to specifications. Should link to at least one specification
specifications:
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidtouchlongclick
@@ -0,0 +1,95 @@
---
name: Tap
short_description: Finger move on the screen
example_usage:
java:
|
TouchActions action = new TouchActions(driver);
action.down(10, 10);
action.move(50, 50);
action.perform();
python:
|
actions = TouchActions(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);
javascript_wdio:
|
driver.touchMultiPerform([
{ action: 'press', options: { x: 100, y: 250 }},
{ action: 'moveTo', options: { x: 300, y: 100 }},
{ action: 'release' }
]);
ruby:
|
@driver.touch_action.down(element).move().perform
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/interactions/touch/TouchActions.html#down-int-int-"
python: "https://seleniumhq.github.io/selenium/docs/api/py/webdriver/selenium.webdriver.common.touch_actions.html#selenium.webdriver.common.touch_actions.TouchActions.move"
javascript_wdio: "http://webdriver.io/api/mobile/touchPerform.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1531"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium%2FWebDriver%2FTouchActionBuilder:move"
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 # TODO Confirm this that mouse movements
windows:
windows: true # TODO Confirm this
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/touch/move
method: POST
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: x
type: number
description: X coordinate on the screen
- name: y
type: number
description: Y coordinate on the screen
# Links to specifications. Should link to at least one specification
specifications:
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidtouchmove
@@ -0,0 +1,123 @@
---
name: Multi Touch Perform
short_description: Perform a multi touch action sequence
example_usage:
java:
|
TouchAction actionOne = new TouchAction();
actionOne.press(10, 10);
actionOne.moveTo(10, 100);
actionOne.release();
TouchAction actionTwo = new TouchAction();
actionTwo.press(20, 20);
actionTwo.moveTo(20, 200);
actionTwo.release();
MultiTouchAction action = new MultiTouchAction();
action.add(actionOne);
action.add(actionTwo);
action.perform();
python:
|
from appium.webdriver.common.touch_action import TouchAction
from appium.webdriver.common.multi_action import MultiAction
# ...
a1 = TouchAction()
a1.press(10, 20)
a1.move_to(10, 200)
a1.release()
a2 = TouchAction()
a2.press(10, 10)
a2.move_to(10, 100)
a2.release()
ma = MultiAction(self.driver)
ma.add(a1, a2)
ma.perform()
javascript_wd:
|
let action = new wd.MultiTouchAction();
action.press({x: 10, y: 10});
action.moveTo({x: 10, y: 100});
action.release();
await driver.performMultiTouchAction(action);
javascript_wdio:
|
driver.touchMultiPerform([
{ action: 'press', options: { x: 100, y: 250 }},
{ action: 'moveTo', options: { x: 300, y: 100 }},
{ action: 'release' }
]);
ruby:
|
@driver.multi_touch.down(element).move_to(10, 100).up(50, 50).perform
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "http://appium.github.io/java-client/io/appium/java_client/MultiTouchAction.html"
python: "https://github.com/appium/python-client/blob/master/appium/webdriver/common/multi_action.py"
javascript_wdio: "http://webdriver.io/api/mobile/touchMultiPerform.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1546"
ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/MultiTouch"
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 # TODO Confirm this that mouse movements
windows:
windows: true # TODO Confirm this
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/touch/multi/perform
method: POST
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: action
type: string
description: The type of action to perform (moveTo|release|press|tap|wait)
- name: options
type: object
description: The parameters of the action
- name: opts.element
type: string
description: The ID of the element
- name: opts.x
type: number
description: The X coordinate of the operation (relative to top left corner)
- name: opts.y
type: number
description: The Y coordinate of the operation (relative to top left corner)
- name: opts.count
type: number
description: Tap count
# 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
@@ -0,0 +1,86 @@
---
name: Scroll
short_description: Scroll on the touch screen using finger based motion events
example_usage:
java:
|
TouchActions action = new TouchActions(driver);
action.scroll(element, 10, 100);
action.perform();
python:
|
actions = TouchActions(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({
el: element,
xOffset: 10,
yOffset: 100
});
ruby:
|
@driver.touch_action.scroll(element, 10, 100).perform
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/interactions/touch/TouchActions.html#scroll-int-int-"
python: "https://seleniumhq.github.io/selenium/docs/api/py/webdriver/selenium.webdriver.common.touch_actions.html#selenium.webdriver.common.touch_actions.TouchActions.scroll"
javascript_wdio: "http://webdriver.io/api/protocol/touchScroll.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L425"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium%2FWebDriver%2FTouchActionBuilder:scroll"
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 # TODO Confirm this that mouse movements
windows:
windows: true # TODO Confirm this
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/touch/scroll
method: POST
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: x
type: number
description: X coordinate on the screen
- name: y
type: number
description: Y coordinate on the screen
# Links to specifications. Should link to at least one specification
specifications:
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidtouchscroll
@@ -0,0 +1,90 @@
---
name: Tap
short_description: Single tap on the touch enabled device
example_usage:
java:
|
TouchActions action = new TouchActions(driver);
action.singleTap(element);
action.perform();
python:
|
actions = TouchActions(driver)
actions.tap(element)
actions.perform()
javascript_wd:
|
// Using tapElement method
await driver.tapElement(elementOne);
// Using touch actions
let action = new wd.TouchAction();
action.tap({el: element});
action.perform();
await driver.performTouchAction(action);
javascript_wdio:
|
driver.touchPerform({
action: 'tap',
options: {
element: element
}
});
ruby:
|
@driver.touch_action.single_tap(element).perform
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/interactions/touch/TouchActions.html#singleTap-org.openqa.selenium.WebElement-"
python: "https://seleniumhq.github.io/selenium/docs/api/py/webdriver/selenium.webdriver.common.touch_actions.html#selenium.webdriver.common.touch_actions.TouchActions.tap"
javascript_wdio: "http://webdriver.io/api/mobile/touchPerform.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1531"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium%2FWebDriver%2FTouchActionBuilder:single_tap"
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 # TODO Confirm this that mouse movements
windows:
windows: true # TODO Confirm this
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/touch/click
method: POST
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: element
type: number
description: ID of the element to double tap on
# Links to specifications. Should link to at least one specification
specifications:
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidtouchclick
@@ -0,0 +1,95 @@
---
name: Touch Down
short_description: Finger down on the screen
example_usage:
java:
|
TouchActions action = new TouchActions(driver);
action.down(10, 10);
action.move(50, 50);
action.perform();
python:
|
actions = TouchActions(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);
javascript_wdio:
|
driver.touchMultiPerform([
{ action: 'press', options: { x: 100, y: 250 }},
{ action: 'moveTo', options: { x: 300, y: 100 }},
{ action: 'release' }
]);
ruby:
|
@driver.touch_action.down(element).move().perform
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/interactions/touch/TouchActions.html#down-int-int-"
python: "https://seleniumhq.github.io/selenium/docs/api/py/webdriver/selenium.webdriver.common.touch_actions.html#selenium.webdriver.common.touch_actions.TouchActions.tap_and_hold"
javascript_wdio: "http://webdriver.io/api/mobile/touchMultiPerform.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1546"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/TouchActionBuilder#down-instance_method"
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 # TODO Confirm this that mouse movements
windows:
windows: true # TODO Confirm this
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/touch/down
method: POST
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: x
type: number
description: X coordinate on the screen
- name: y
type: number
description: Y coordinate on the screen
# Links to specifications. Should link to at least one specification
specifications:
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidtouchdown
@@ -0,0 +1,117 @@
---
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
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.
example_usage:
java:
|
TouchAction action = new TouchAction(driver);
action.press(10, 10);
action.moveTo(10, 100);
action.release();
action.perform();
python:
|
from appium.webdriver.common.touch_action import TouchAction
actions = TouchAction(driver)
actions.tap_and_hold(20, 20)
actions.move_to(10, 100)
actions.release()
actions.perform()
javascript_wd:
|
let action = new wd.TouchAction();
action.press({x: 10, y: 10});
action.moveTo({x: 10, y: 100});
action.release();
action.perform();
await driver.performTouchAction(action);
javascript_wdio:
|
driver.touchPerform([
{ action: 'press', options: { x: 100, y: 250 }},
{ action: 'moveTo', options: { x: 300, y: 100 }},
{ action: 'release' }
]);
ruby:
|
@driver.touch_action.down(element).move_to(10, 100).up(50, 50).perform
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "http://appium.github.io/java-client/io/appium/java_client/TouchAction.html"
python: "https://github.com/appium/python-client/blob/master/appium/webdriver/common/touch_action.py"
javascript_wdio: "http://webdriver.io/api/mobile/performTouchAction.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1546"
ruby: "http://www.rubydoc.info/github/appium/ruby_lib/Appium/TouchAction"
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 # TODO Confirm this that mouse movements
windows:
windows: true # TODO Confirm this
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/touch/perform
method: POST
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: action
type: string
description: The type of action to perform (moveTo|release|press|tap|wait)
- name: options
type: object
description: The parameters of the action
- name: opts.element
type: string
description: The ID of the element
- name: opts.x
type: number
description: The X coordinate of the operation (relative to top left corner)
- name: opts.y
type: number
description: The Y coordinate of the operation (relative to top left corner)
- name: opts.count
type: number
description: Tap count
# 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
@@ -0,0 +1,95 @@
---
name: Touch Up
short_description: Finger up on the screen
example_usage:
java:
|
TouchActions action = new TouchActions(driver);
action.down(10, 10);
action.up(20, 20);
action.perform();
python:
|
actions = TouchActions(driver)
actions.tap_and_hold(20, 20)
actions.release(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.release({x: 20, y: 20});
action.perform();
await driver.performTouchAction(action);
javascript_wdio:
|
driver.touchMultiPerform([
{ action: 'press', options: { x: 100, y: 250 }},
{ action: 'moveTo', options: { x: 300, y: 100 }},
{ action: 'release' }
]);
ruby:
|
@driver.touch_action.down(element).up(50, 50).perform
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/interactions/touch/TouchActions.html#up-int-int-"
python: "https://seleniumhq.github.io/selenium/docs/api/py/webdriver/selenium.webdriver.common.touch_actions.html#selenium.webdriver.common.touch_actions.TouchActions.release"
javascript_wdio: "http://webdriver.io/api/mobile/touchMultiPerform.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1546"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium%2FWebDriver%2FTouchActionBuilder:up"
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 # TODO Confirm this that mouse movements
windows:
windows: true # TODO Confirm this
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/touch/up
method: POST
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: x
type: number
description: X coordinate on the screen
- name: y
type: number
description: Y coordinate on the screen
# Links to specifications. Should link to at least one specification
specifications:
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidtouchup
+70
View File
@@ -0,0 +1,70 @@
---
name: Go Back
short_description: Navigate backwards in the browser history, if possible (Web context only)
example_usage:
java:
|
driver.back();
python:
|
self.driver.back()
javascript_wd:
|
await driver.back();
javascript_wdio:
|
driver.back();
ruby:
|
@driver.back()
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/WebDriver.Navigation.html#back---"
python: "http://selenium-python.readthedocs.io/api.html#selenium.webdriver.remote.webdriver.WebDriver.back"
javascript_wdio: "http://webdriver.io/api/protocol/back.html#description"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L640"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Navigation:back"
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/back
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:
w3c: https://www.w3.org/TR/webdriver/#dfn-back
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidback
+138
View File
@@ -0,0 +1,138 @@
---
name: Create New Session
short_description: Create a new session
description:
|
The server should attempt to create a session that most closely matches the desired and required capabilities.
* [JSONWP Spec](https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#session-1) Required capabilities have higher priority than desired capabilities and must be set for the session to be created
* [W3C Spec](https://www.w3.org/TR/webdriver/#dfn-new-session) capabilities.alwaysMatch must be set for session to be created; capabilities.firstMatch must match at least one (the first one to match will be used)
example_usage:
java:
|
DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
desiredCapabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, "10.3");
desiredCapabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "iPhone Simulator");
desiredCapabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME, "XCUITest");
desiredCapabilities.setCapability(MobileCapabilityType.APP, "/path/to/ios/app.zip");
URL url = new URL("http://127.0.0.1:4723/wd/hub");
IOSDriver driver = new IOSDriver(url, desiredCapabilities);
String sessionId = driver.getSessionId().toString();
python:
|
desired_caps = desired_caps = {
'platformName': 'Android',
'platformVersion': '7.0',
'deviceName': 'Android Emulator',
'automationName': 'UiAutomator2',
'app': PATH('/path/to/app')
}
self.driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub', desired_caps)
javascript_wd:
|
let driver = await wd.promiseChainRemote({
host: '127.0.0.1',
port: 4723
});
let desiredCaps = {
platformName: 'Android',
platformVersion: '7.0',
deviceName: 'Android Emulator',
app: path.resolve('path', 'to', 'app.apk')
};
await driver.init(desiredCaps);
javascript_wdio:
|
let options = { desiredCapabilities: {
platformName: 'Android',
platformVersion: '7.0',
automationName: 'UiAutomator2',
app: path.resolve('path', 'to', 'app.apk')
}};
let client = webdriverio.remote(options);
ruby:
|
APP_PATH = '../../path/to/app.app'
desired_caps = {
caps: {
platformName: 'iOS',
platformVersion: '10.2',
deviceName: 'iPhone 6',
app: APP_PATH,
automationName: "XCUITest"
}
}
Appium::Driver.new(desired_caps).start_driver
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/remote/server/DefaultSession.html#createSession-org.openqa.selenium.remote.server.DriverFactory-org.openqa.selenium.remote.server.Clock-org.openqa.selenium.remote.SessionId-org.openqa.selenium.Capabilities-"
python: "http://selenium-python.readthedocs.io/api.html#selenium.webdriver.remote.webelement.WebElement.clear"
javascript_wdio: "http://webdriver.io/api/action/clearElement.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1780"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Element:clear"
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: /session
method: POST
json_parameters:
- name: desiredCapabilities
type: object
description: ([JSONWP specification](https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#session-1)) Object describing session's [desired capabilities](/docs/en/writing-running-appium/caps.md)
- name: requiredCapabilities
type: object
description: ([JSONWP specification](https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#session-1)) Object describing session's required capabilities that must be applied by remote end
- name: capabilities
type: object
description: ([W3C specification](https://www.w3.org/TR/webdriver/#dfn-new-session)) object containing 'alwaysMatch' and 'firstMatch' properties
- name: capabilities.alwaysMatch
type: object
description: The [desired capabilities](/docs/en/writing-running-appium/caps.md) that the remote end must match
- name: capabilities.firstMatch
type: array<object>
description: List of capabilities that the remote end tries to match. Matches the first in the list
response:
- type: object
description: An object describing the session's capabilities
# Links to specifications. Should link to at least one specification
specifications:
w3c: https://www.w3.org/TR/webdriver/#dfn-new-session
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#session-1
+71
View File
@@ -0,0 +1,71 @@
---
name: End Session
short_description: End the running session
example_usage:
java:
|
driver.quit();
python:
|
self.driver.quit()
javascript_wd:
|
await driver.quit();
javascript_wdio:
|
driver.end();
ruby:
|
@driver.quit();
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#quit--"
python: "http://selenium-python.readthedocs.io/api.html#selenium.webdriver.remote.webdriver.WebDriver.quit"
javascript_wdio: "http://webdriver.io/api/utility/end.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L470"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Driver:quit"
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: /session/:session_id
method: DELETE
url_parameters:
- name: session_id
description: ID of the session to delete
# Links to specifications. Should link to at least one specification
specifications:
w3c: https://www.w3.org/TR/webdriver/#dfn-delete-session
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionid
@@ -0,0 +1,80 @@
---
name: Get Geolocation
short_description: Get the current geo location
example_usage:
java:
|
Location location = driver.location(); // Must be a driver that implements LocationContext
python:
|
location = self.driver.location()
javascript_wd:
|
let location = await driver.sessionCapabilities('c8db88a0-47a6-47a1-802d-164d746c06aa');
javascript_wdio:
|
let location = driver.location();
ruby:
|
@driver.location()
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/html5/LocationContext.html#location--"
python: "http://selenium-python.readthedocs.io/api.html"
javascript_wdio: "http://webdriver.io/api/protocol/location.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L393"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/DriverExtensions/HasLocation#set_location-instance_method"
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: /session/:session_id/location
method: GET
url_parameters:
- name: session_id
description: ID of the session to route the command to
response:
- name: latitude
type: number
description: The current geolocation latitude
- name: longitude
type: number
description: The current geolocation longitude
- name: altitude
type: number
description: The current geolocation altitude
# Links to specifications. Should link to at least one specification
specifications:
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidlocation
@@ -0,0 +1,80 @@
---
name: Set Geolocation
short_description: Set the current geo location
example_usage:
java:
|
driver.setLocation(new Location(49, 123, 10)); // Must be a driver that implements LocationContext
python:
|
self.driver.set_location(49, 123, 10)
javascript_wd:
|
let location = await driver.sessionCapabilities('c8db88a0-47a6-47a1-802d-164d746c06aa');
javascript_wdio:
|
driver.location({latitude: 121.21, longitude: 11.56, altitude: 94.23});
ruby:
|
@driver.set_location(121.21, 11.56, 94.23)
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/html5/LocationContext.html#location--"
python: "http://selenium-python.readthedocs.io/api.html"
javascript_wdio: "http://webdriver.io/api/protocol/location.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L407"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium%2FWebDriver%2FDriverExtensions%2FHasLocation:set_location"
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: /session/:session_id/location
method: POST
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: latitude
type: number
description: The current geolocation latitude
- name: longitude
type: number
description: The current geolocation longitude
- name: altitude
type: number
description: The current geolocation altitude
# Links to specifications. Should link to at least one specification
specifications:
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#post-sessionsessionidlocation
+73
View File
@@ -0,0 +1,73 @@
---
name: Get Session Capabilities
short_description: Retrieve the capabilities of the specified session
example_usage:
java:
|
Map<String, Object> caps = driver.getSessionDetails();
python:
|
desired_caps = self.driver.desired_capabilities()
javascript_wd:
|
let caps = await driver.sessionCapabilities('c8db88a0-47a6-47a1-802d-164d746c06aa');
javascript_wdio:
|
let caps = driver.session('c8db88a0-47a6-47a1-802d-164d746c06aa');
ruby:
|
@driver.session_capabilities()
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/remote/server/DefaultDriverSessions.html#get-org.openqa.selenium.remote.SessionId-"
python: "http://selenium-python.readthedocs.io/api.html#selenium.webdriver.remote.webdriver.WebDriver.desired_capabilities"
javascript_wdio: "http://webdriver.io/api/protocol/session.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L227"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium%2FWebDriver%2FRemote%2FOSS%2FBridge:session_capabilities"
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: /session/:session_id
method: GET
url_parameters:
- name: session_id
description: ID of the session to route the command to
response:
- type: object
description: An object describing the session's capabilities
# Links to specifications. Should link to at least one specification
specifications:
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionid
@@ -0,0 +1,73 @@
---
name: Get available log types
short_description: Get the log for a given log type. Log buffer is reset after each request
example_usage:
java:
|
Set<String> logTypes = driver.manage().logs().getAvailableLogTypes();
python:
|
log_types = driver.log_types();
javascript_wd:
|
const logTypes = await driver.logTypes();
javascript_wdio:
|
driver.log()
ruby:
|
log_types = @driver.logTypes
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/logging/SessionLogs.html#getLogTypes--"
python: "http://selenium-python.readthedocs.io/api.html?highlight=get_log#selenium.webdriver.remote.webdriver.WebDriver.log_types"
javascript_wdio: "http://webdriver.io/api/protocol/logTypes.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L441"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium%2FWebDriver%2FRemote%2FOSS%2FBridge:available_log_types"
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 # TODO Confirm this that mouse movements
windows:
windows: true # TODO Confirm this
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/log/types
method: GET
url_parameters:
- name: session_id
description: ID of the session to route the command to
response:
- type: array<string>
description: The list of log types
# Links to specifications. Should link to at least one specification
specifications:
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidlogtypes
@@ -0,0 +1,77 @@
---
name: Get Logs
short_description: Get the log for a given log type. Log buffer is reset after each request
example_usage:
java:
|
LogEntries logEntries = driver.manage().logs().get("driver");
python:
|
logs = driver.get_log('driver');
javascript_wd:
|
const logs = await driver.log('driver');
javascript_wdio:
|
let logs = driver.log('driver')
ruby:
|
@driver.logs('driver')
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/logging/SessionLogs.html#getLogTypes--"
python: "http://selenium-python.readthedocs.io/api.html?highlight=get_log#selenium.webdriver.remote.webdriver.WebDriver.get_log"
javascript_wdio: "http://webdriver.io/api/protocol/log.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L455"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium%2FWebDriver%2FTouchActionBuilder:scroll"
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 # TODO Confirm this that mouse movements
windows:
windows: true # TODO Confirm this
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/log
method: POST
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: type
type: string
description: The log type
response:
- type: array<object>
description: The list of log entries
# Links to specifications. Should link to at least one specification
specifications:
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidlog
@@ -0,0 +1,73 @@
---
name: Get Orientation
short_description: Get the current device/browser orientation
example_usage:
java:
|
ScreenOrientation orientation = driver.getOrientation();
python:
|
orientation = self.driver.orientation()
javascript_wd:
|
let orientation = await driver.getOrientation();
javascript_wdio:
|
let orientation = driver.orientation();
ruby:
|
@driver.orientation()
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/Rotatable.html#getOrientation--"
python: "http://selenium-python.readthedocs.io/api.html#selenium.webdriver.remote.webdriver.WebDriver.orientation"
javascript_wdio: "http://webdriver.io/api/mobile/orientation.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2021"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/DriverExtensions/Rotatable:orientation"
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: /session/:session_id/orientation
method: GET
url_parameters:
- name: session_id
description: ID of the session to route the command to
response:
- type: string
description: The current browser orientation {LANDSCAPE|PORTRAIT}
# Links to specifications. Should link to at least one specification
specifications:
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidorientation

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