Compare commits

..
Author SHA1 Message Date
dan@saucelabs.com 4bf6c6e8fc Prepare for v1.8.0-beta3 2018-01-30 09:10:40 -08:00
dan@saucelabs.com b0f1e56ede Prepare for v1.8.0-beta2 2018-01-29 13:10:14 -08:00
Mykola Mokhnach b0857eefb1 Use uia2 backend by default if platform version is greater or equal to 6 (#10073)
* Use uia2 backend by default if platform version is greater or equal to 6

* Allow to force set the backend to UIA1

* Add unit tests

* Tune the log message

* Print a warning message instead of changing the driver type

* Remove redundant imports

* Tune the message

* Address PR comments
2018-01-29 11:31:37 -05:00
Dan Graham 8efff6895e Test content-type in errors (#10077) 2018-01-29 11:31:29 -05:00
Dan Graham 69eed603c3 Remove unnecessary 'finally' block (#10076)
* Shouldn't have had finally block because then it does two checks to fall back to MJSONWP
* Also fixed outdated tests
2018-01-29 11:31:20 -05:00
Dan Graham f91c6b50aa Fall back to MJSONWP if W3C is invalid (#10034)
* If processCapabilities throws error, then log a warning that it was invalid and log the message and fall back to using jsonwpCaps
2018-01-29 11:31:10 -05:00
Dan Graham 46395d7c46 Use MJSONWP if dcaps have extraneous params (#10019)
* Update `parseCapsForInnerDriver` so that now if it finds extraneous keys in `jsonwpCaps`, fall back to using MJSONWP instead of W3C
* After getting processed caps, check the protocol again because if `processedW3CCapabilities` was set to null, it should be JWP
* Removed tests that tested for capabilities being merged together (those are no longer needed)
* Added tests (unit test and e2e test) that check that creation of a new session will fall back to JSONWP when there are extraneous keys
2018-01-29 11:30:59 -05:00
Isaac A. Murchie 5a2cf8d1c4 Get rid of arrow functions in mocha aparatus (#10013) 2018-01-29 11:30:49 -05:00
Isaac A. Murchie 281b3cfdeb Add 2.34 and 2.35 to Chromedriver compatibility doc (#10012) 2018-01-29 11:30:39 -05:00
1119 changed files with 40944 additions and 92279 deletions
-13
View File
@@ -1,13 +0,0 @@
# editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false
+1 -10
View File
@@ -1,11 +1,2 @@
**/coverage/**
**/node_modules/**
examples/javascript-wd
**/build/**
**/*.min.js
sample-code
**/*.d.ts
**/build-fixtures/**
**/*.ts
packages/appium/docs/**/assets/**
**/*.tsx
coverage
+1 -51
View File
@@ -1,53 +1,3 @@
{
"extends": "@appium/eslint-config-appium",
"overrides": [
{
"files": "packages/fake-driver/**/*",
"rules": {"require-await": "off"}
},
{"files": "packages/support/**/*", "globals": {"BigInt": "readonly"}},
{
"files": "packages/*/test/**/*",
"rules": {"func-names": "off"}
},
{
"files": ["packages/*/index.js", "packages/*/scripts/**/*.js", "test/*.js"],
"parserOptions": {
"sourceType": "script"
}
},
{
"files": [
"packages/appium/support.js",
"packages/appium/driver.js",
"packages/appium/plugin.js"
],
"parserOptions": {
"sourceType": "script"
}
},
{
"files": "./packages/*/test/**/*.js",
"rules": {
"no-restricted-properties": [
"error",
{
"object": "sinon",
"property": "spy",
"message": "Use `sandbox = sinon.createSandbox()` and `sandbox.spy()` instead. Don't forget to call `sandbox.restore()` in `afterEach`"
},
{
"object": "sinon",
"property": "stub",
"message": "Use `sandbox = sinon.createSandbox()` and `sandbox.stub()` instead. Don't forget to call `sandbox.restore()` in `afterEach`"
},
{
"object": "sinon",
"property": "mock",
"message": "Use `sandbox = sinon.createSandbox()` and `sandbox.mock()` instead. Don't forget to call `sandbox.restore()` in `afterEach`"
}
]
}
}
]
"extends": "appium"
}
-56
View File
@@ -1,56 +0,0 @@
# Generated by FOSSA CLI (https://github.com/fossas/fossa-cli)
# Visit https://fossa.com to learn more
version: 3
project:
id: appium
name: appium
paths:
exclude:
- ./sample-code
- '**/fixtures/**'
- '**/demo/**'
- '**/example/**'
- '**/examples/**'
targets:
only:
- type: npm
path: .
- type: npm
path: ./packages/appium
- type: npm
path: ./packages/base-driver
- type: npm
path: ./packages/doctor
- type: npm
path: ./packages/eslint-config-appium
- type: npm
path: ./packages/fake-driver
- type: npm
path: ./packages/support
- type: npm
path: ./packages/test-support
- type: npm
path: ./packages/types
- type: npm
path: ./packages/schema
- type: npm
path: ./packages/universal-xmlplugin
- type: npm
path: ./packages/opencv
- type: npm
path: ./packages/images-plugin
- type: npm
path: ./packages/base-plugin
- type: npm
path: ./packages/relaxed-caps-plugin
- type: npm
path: ./packages/fake-plugin
- type: npm
path: ./packages/docutils
revision:
- branch: master
-4
View File
@@ -1,4 +0,0 @@
* text=auto eol=lf
# Handle as a text file but merge as binary.
package-lock.json merge=binary
+32
View File
@@ -0,0 +1,32 @@
## The problem
Briefly describe the issue you are experiencing (or the feature you want to see added to Appium). Tell us what you were trying to do and what happened instead. Remember, this is _not_ a place to ask questions. For that, go to http://discuss.appium.io!
## Environment
* Appium version (or git revision) that exhibits the issue:
* Last Appium version that did not exhibit the issue (if applicable):
* Desktop OS/version used to run Appium:
* Node.js version (unless using Appium.app|exe):
* Mobile platform/version under test:
* Real device or emulator/simulator:
* Appium CLI or Appium.app|exe:
## Details
If necessary, describe the problem you have been experiencing in more detail.
## Link to Appium logs
Create a [GIST](https://gist.github.com) which is a paste of your _full_ Appium logs, and link them here.
Do _NOT_ paste your full Appium logs here, as it will make this issue very long and hard to read!
If you are reporting a bug, _always_ include Appium logs!
## Code To Reproduce Issue [ Good To Have ]
Please remember that with sample code it's easier to reproduce the bug and it's much faster to fix it.
Please git clone https://github.com/appium/sample-code and use one of your favourite languages and sample apps to reproduce the issue.
In case a similar scenario is missing in sample-code, please submit a PR with one of the sample apps provided.
-80
View File
@@ -1,80 +0,0 @@
name: 🐞 Bug Report
description: File a new bug report
title: 'bug: <title>'
labels: [Bug, Needs Triage]
body:
- type: markdown
attributes:
value: ':stop_sign: _For support questions, please visit [http://discuss.appium.io](http://discuss.appium.io) instead._'
- type: checkboxes
attributes:
label: 'Is there an existing issue for this?'
description: 'Please [search :mag: the issues](https://github.com/appium/appium/issues) to check if this bug has already been reported.'
options:
- label: 'I have searched the existing issues'
required: true
- type: textarea
attributes:
label: 'Current Behavior'
description: 'Describe the problem you are experiencing. **Please do not paste your logs here.** Screenshots are welcome.'
validations:
required: true
- type: textarea
attributes:
label: 'Expected Behavior'
description: 'Describe what you expect to happen instead.'
validations:
required: true
- type: textarea
attributes:
label: 'Minimal Reproducible Example'
description: |
Please provide a the _smallest, complete code snippet_ that Appium's maintainers can run to reproduce the issue ([read more about what this entails](https://stackoverflow.com/help/minimal-reproducible-example)). Failing this, any sort of reproduction steps are better than nothing!
An easy way to get started is to copy [sample code](https://github.com/appium/appium/tree/master/packages/appium/sample-code) and modify it accordingly.
If the result is more than a screenful of text _or_ requires multiple files, please:
- _Attach_ (do not paste) it to this textarea, _or_
- Put it in a [Gist](https://gist.github.com) and paste the link, _or_
- Provide a link to a new or existing public repository exhibiting the issue
validations:
required: true
- type: textarea
attributes:
label: 'Environment'
description: 'Please provide the following information about your environment; feel free to remove any items which are not relevant.'
value: |
- Operating system:
- If running via `appium` CLI...
- Appium CLI version (output of `appium --version`):
- Node.js version (output of `node --version`):
- `npm` version (output of `npm --version`):
- Last `appium` version which did _not_ exhibit the problem:
- If running Appium Desktop, its version:
- Appium driver(s) and their version(s):
- Appium plugin(s) and their version(s):
- Platform and version under test:
- Real device or emulator/simulator:
validations:
required: false
- type: input
attributes:
label: 'Link to Appium Logs'
description: |
Create a [Gist](https://gist.github.com)—which contains your _full_ Appium logs—and link it here. Alternatively, you can attach a logfile to this issue (drag it into the "Further Information" field below).
:warning: _Remember to redact or remove any sensitive information!_
placeholder: 'https://gist.github.com/...'
- type: textarea
attributes:
label: Futher Information
description: |
Links? References? Anything that will give us more context about the issue you are encountering!
_Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in._
validations:
required: false
- type: markdown
attributes:
value: ':stop_sign: _For support questions, please visit [http://discuss.appium.io](http://discuss.appium.io) instead._'
-20
View File
@@ -1,20 +0,0 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[Feat]:"
labels: enhancement
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
+1 -2
View File
@@ -10,14 +10,13 @@ _Put an `x` in the boxes that apply_
- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation Update (if none of the other choices apply)
## Checklist
_Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code._
- [ ] I have read the [CONTRIBUTING](https://github.com/appium/appium/blob/master/CONTRIBUTING.md) doc
- [ ] I have signed the CLA
- [ ] I have signed the [CLA](https://cla.js.foundation/appium/appium)
- [ ] Lint and unit tests pass locally with my changes
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] I have added necessary documentation (if appropriate)
-26
View File
@@ -1,26 +0,0 @@
# Configuration for Lock Threads - https://github.com/dessant/lock-threads
# Number of days of inactivity before a closed issue or pull request is locked
daysUntilLock: 365
# Skip issues and pull requests created before a given timestamp. Timestamp must
# follow ISO 8601 (`YYYY-MM-DD`). Set to `false` to disable
skipCreatedBefore: false
# Issues and pull requests with these labels will be ignored. Set to `[]` to disable
exemptLabels: []
# Label to add before locking, such as `outdated`. Set to `false` to disable
lockLabel: false
# Comment to post before locking. Set to `false` to disable
lockComment: >
This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.
# Assign `resolved` as the reason for locking. Set to `false` to disable
setLockReason: false
# Limit to only `issues` or `pulls`
only: issues
-47
View File
@@ -1,47 +0,0 @@
name: Appium Build
on: [push, pull_request]
permissions:
contents: read
jobs:
test:
name: Tests
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install latest npm
run: npm install -g npm
- name: Install dependencies
uses: bahmutov/npm-install@1a235c31658a322a3b024444759650ee6345c26d # tag=v1
with:
useRollingCache: true
install-command: npm ci --foreground-scripts
- name: Run smoke, unit & E2E tests
run: npm run test:ci
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- name: Install dependencies
uses: bahmutov/npm-install@1a235c31658a322a3b024444759650ee6345c26d # tag=v1
with:
useRollingCache: true
install-command: npm ci --foreground-scripts
- name: ESLint
run: npm run lint
- name: Validate Renovate Config
uses: rinchsan/renovate-config-validator@1ea1e8514f6a33fdd71c40b0a5fa3512b9e7b936 # tag=v0
with:
pattern: '{.renovaterc.json,renovate/default.json}'
-58
View File
@@ -1,58 +0,0 @@
name: Appium Deploy
on:
push:
tags:
- master
workflow_dispatch:
permissions:
contents: read
jobs:
check:
name: Check
runs-on: ${{ matrix.os }}
strategy:
matrix:
# node-version: [14.x, 16.x, 18.x]
node-version: [16.x, 18.x]
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
with:
node-version: ${{ matrix.node-version }}
- name: Install Appium
run: |
if [[ "$GITHUB_REF_TYPE" == tag ]]; then
npm i -g $GITHUB_REF_NAME
else
npm i -g appium@next
fi
shell: bash
- name: Install drivers and plugins
run: |
if grep -q macos <<< ${{ matrix.os }}; then
appium driver install xcuitest
fi
appium driver install uiautomator2
appium plugin install images
shell: bash
- name: Verify installation
run: |
installed_drivers=$(appium driver list --installed 2>&1)
if grep -q macos <<< ${{ matrix.os }}; then
grep -q xcuitest <<< $installed_drivers
fi
grep -q uiautomator2 <<< $installed_drivers
installed_plugins=$(appium plugin list --installed 2>&1)
grep -q images <<< $installed_plugins
shell: bash
- name: Verify Appium could be executed
run: |
appium --use-plugins=images &
pid=$(echo $!)
sleep 5
ps -p $pid || exit 1
kill -2 $pid
shell: bash
-26
View File
@@ -1,26 +0,0 @@
name: License Checks
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
permissions:
contents: read
jobs:
fossa-check:
name: Run FOSSA Analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
with:
ref: master
- name: Install dependencies
uses: bahmutov/npm-install@cb39a46f27f14697fec763d60fb23ad347e2befa # tag=v1
- name: Install fossa-cli
run: ./scripts/install-fossa.sh -d
- name: Run FOSSA analysis
run: |
fossa analyze
fossa test
env:
FOSSA_API_KEY: ${{secrets.FOSSA_API_KEY}}
+4 -33
View File
@@ -2,20 +2,20 @@
*.swp
.DS_Store
node_modules
package-lock.json
sample-code
*.trace
xcuserdata
*.sublime-*
test/functional/_joined
*.iml
!examples/java/*.iml
*.autosave
.idea/
!examples/java/.idea/
*.log
*.t
artifacts
input
./output
output
lib/devices/android/bootstrap/bin/*
lib/devices/android/bootstrap/local.properties
lib/devices/android/bootstrap/project.properties
@@ -24,42 +24,13 @@ lib/devices/android/bootstrap/target/
.*~
*~
org.eclipse.ltk.core.refactoring.prefs
/selendroid
.appiumconfig*
build/
.idea
*DerivedData
__pycache__
# csharp
*.pyc
*.pdb
.vs
old
.tern-project
coverage
docs/mkdocs.yml
examples/javascript-wd/node_modules
examples/php/vendor
examples/php/composer.lock
examples/java/out/
examples/ruby/Gemfile.lock
examples/python/test/results/
examples/python/test/input
examples/python/.pytest_cache/
examples/csharp/test/bin
examples/csharp/test/obj
examples/csharp/test/bin
examples/csharp/packages
appium.zip
.vscode/settings.json
.nyc_output
*.lerna_backup
**/build-fixtures/**
*.tsbuildinfo
packages/*/LICENSE
local_appium_home
jsdoc-out
*.tgz
typedoc-docs
packages/appium/docs/*/reference
-4
View File
@@ -1,4 +0,0 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
npm run lint:commit -- --edit ${1}
-4
View File
@@ -1,4 +0,0 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
npm run lint:staged
-11
View File
@@ -1,11 +0,0 @@
module.exports = {
'*.js': ['eslint --fix', 'prettier --write'],
'*.ts': ['prettier --write'],
'appium-config-schema.js': () => [
'npm run --workspace=./packages/schema build',
'git add -A packages/schema/lib/appium-config.schema.json',
'npm run --workspace=./packages/types build',
'git add -A packages/types/lib/appium-config.ts',
],
'!(package|package-lock)*.json': ['prettier --write'],
};
-12
View File
@@ -1,12 +0,0 @@
// @ts-check
'use strict';
module.exports = {
require: [require.resolve('./test/setup.js')],
// forbids use of .only() in CI
forbidOnly: Boolean(process.env.CI),
color: true,
// increase default timeout for CI since it can be slow
timeout: process.env.CI ? '5s' : '2s',
};
+16 -1
View File
@@ -1 +1,16 @@
tsconfig.tsbuildinfo
assets/
submodules/
test/
_vimrc_local.vim
*.swp
*.swo
*~
.*~
.DS_Store
.travis.yml
*.log
*.trace
*.sublime-
*.prefs
./.npmignore
coverage
+1 -4
View File
@@ -1,4 +1 @@
# Do not disable package-lock. Disabling package-lock also disables npm-shrinkwrap
package-lock=true
save-exact=true
foreground-scripts=true
package-lock=false
-13
View File
@@ -1,13 +0,0 @@
**/node_modules/**
**/build/**
**/fixtures/**
**/*.min.*
**/*.md
package-lock.json
package.json
**/.vscode/**
**/*.html
**/generated/**
# generated
packages/types/lib/appium-config.ts
**/*.hbs
-6
View File
@@ -1,6 +0,0 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["github>appium/appium//renovate/default"],
"schedule": ["after 10pm and before 5:00am"],
"timezone": "America/Vancouver"
}
+15
View File
@@ -0,0 +1,15 @@
language: node_js
sudo: false
node_js:
- "7"
- "6"
env:
- CXX=g++-4.8
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
script:
- npm run generate-docs && npm run test && npm run e2e-test
-63
View File
@@ -1,63 +0,0 @@
{
"configurations": [
{
"args": [
"--log-level=debug"
],
"console": "integratedTerminal",
"cwd": "${workspaceFolder}",
"env": {
"_FORCE_LOGS": "1"
},
"internalConsoleOptions": "openOnSessionStart",
"name": "Run Appium",
"program": "${workspaceFolder}/node_modules/.bin/appium",
"request": "launch",
"skipFiles": [
"<node_internals>/**"
],
"sourceMaps": true,
"type": "node"
},
{
"args": [
"--colors",
"--no-timeout",
"${file}"
],
"autoAttachChildProcesses": true,
"console": "integratedTerminal",
"cwd": "${workspaceFolder}",
"internalConsoleOptions": "openOnSessionStart",
"name": "Test Current File w/ Mocha",
"program": "${workspaceFolder}/node_modules/.bin/mocha",
"request": "launch",
"runtimeArgs": [
"--require",
"ts-node/register"
],
"skipFiles": [
"<node_internals>/**",
"**/node_modules/mocha/**",
"**/node_modules/ts-node/**"
],
"sourceMaps": true,
"type": "node"
},
{
"console": "integratedTerminal",
"cwd": "${workspaceFolder}",
"internalConsoleOptions": "openOnSessionStart",
"name": "Typedoc",
"program": "${workspaceFolder}/node_modules/.bin/typedoc",
"args": ["--logLevel", "Verbose"],
"request": "launch",
"skipFiles": [
"<node_internals>/**"
],
"sourceMaps": true,
"type": "node"
}
],
"version": "0.2.0"
}
-27
View File
@@ -1,27 +0,0 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "dev",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [
"$tsc-watch"
],
"label": "npm: dev",
"detail": "npm run dev",
"isBackground": true
},
{
"type": "npm",
"script": "typedoc",
"problemMatcher": [],
"label": "npm: typedoc",
"detail": "typedoc --logLevel Verbose",
"group": "build"
}
]
}
-74
View File
@@ -1,74 +0,0 @@
'use strict';
module.exports = (wallaby) => {
return {
compilers: {
'**/*.js': wallaby.compilers.typeScript({
allowJs: true,
allowSyntheticDefaultImports: true,
resolveJsonModule: true,
isolatedModules: true,
}),
'**/*.ts?(x)': wallaby.compilers.typeScript(),
},
debug: true,
env: {
type: 'node',
},
files: [
'./packages/*/build/**/*',
'./packages/*/lib/**/*.(j|t)s',
'./packages/*/test/**/*helper*.(j|t)s',
'./packages/*/test/**/*mock*.(j|t)s',
'./packages/*/package.json',
'./packages/*/tsconfig*.json',
'./packages/*/test/**/fixture?(s)/**/*',
{
instrument: false,
pattern: './packages/typedoc-plugin-appium/resources/**/*',
},
{
binary: true,
pattern: './packages/support/test/unit/assets/sample_binary.plist',
},
{
instrument: false,
pattern: './packages/support/test/unit/assets/sample_text.plist',
},
{
instrument: false,
pattern: './packages/base-driver/static/**/*',
},
{
instrument: false,
pattern: './packages/typedoc-plugin-appium/lib/theme/resources/**',
},
'!./packages/*/test/**/*-specs.js',
'!./packages/*/test/**/*.e2e.spec.(j|t)s',
'!**/local_appium_home/**',
],
testFramework: 'mocha',
tests: ['./packages/*/test/unit/**/*.spec.(j|t)s', '!**/local_appium_home/**'],
workers: {
// restart: true,
},
setup(wallaby) {
// copied out of `./test/setup.js`
const chai = require('chai');
const chaiAsPromised = require('chai-as-promised');
const sinonChai = require('sinon-chai');
// The `chai` global is set if a test needs something special.
// Most tests won't need this.
global.chai = chai.use(chaiAsPromised).use(sinonChai);
// `should()` is only necessary when working with some `null` or `undefined` values.
global.should = chai.should();
const mocha = wallaby.testFramework;
mocha.timeout(10000);
},
runMode: 'onsave',
};
};
+5 -1139
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -8,7 +8,7 @@ Note that no matter how you contribute, your participation is governed by our
### Make changes to the Appium code or docs
Fork the project, make a change, and send a pull request! Please have a look at
our [Style Guide](/docs/en/contributing-to-appium/style-guide.md) before
our [Style Guide](/docs/en/contributing-to-appium/style-guide-2.0.md) before
getting to work. Please make sure the unit and functional tests pass before
sending a pull request; for more information on how to run tests, keep reading!
-1
View File
@@ -77,7 +77,6 @@ The current committers are (in addition to the TC members above):
* [@triager](https://github.com/triager)
* [@ddkjin](https://github.com/ddkjin)
* [@stuartbrussell-intuit](https://github.com/stuartbrussell-intuit)
* [@vmaxim](https://github.com/vmaxim)
### Contributors
+62 -157
View File
@@ -1,193 +1,96 @@
## Appium
[![NPM version](https://badge.fury.io/js/appium.svg)](https://npmjs.org/package/appium)
[![Monthly Downloads](https://img.shields.io/npm/dm/appium.svg)](https://npmjs.org/package/appium)
[![Dependency Status](https://david-dm.org/appium/appium.svg)](https://david-dm.org/appium/appium)
[![devDependency Status](https://david-dm.org/appium/appium/dev-status.svg)](https://david-dm.org/appium/appium#info=devDependencies)
[![Monthly Downloads](https://img.shields.io/npm/dm/appium.svg)](https://npmjs.org/package/appium)
[![Pull Requests](http://issuestats.com/github/appium/appium/badge/pr?style=flat)](http://issuestats.com/github/appium/appium)
[![Issues Closed](http://issuestats.com/github/appium/appium/badge/issue?style=flat)](http://issuestats.com/github/appium/appium)
[![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)
[![StandWithUkraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://github.com/vshymanskyy/StandWithUkraine/)
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).
[![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine/)
Want to skip straight to the action? Check out our [getting
started](/docs/en/about-appium/getting-started.md) doc.
Appium is an open-source, cross-platform test automation tool for native,
hybrid, mobile web and desktop apps. Initially created to automate iOS and Android mobile
applications Appium has grown to a full-featured platform that provides [WebDriver](https://www.w3.org/TR/webdriver/)-based automation possibilities for the whole set of different mobile and desktop platforms.
See [Drivers Maintained By The Appium Team](#drivers-maintained-by-the-appium-team)
and [Drivers Provided By Third Parties](#drivers-provided-by-third-parties) sections below for more details.
:bangbang: Major documentation revision in progress
:bangbang: Appium core team does not maintain Appium 1.x anymore since the 1st of January 2022. All recent versions of officially supported platform drivers are not compatible to Appium 1.x anymore, and require Appium 2 to run. [Please read the migration guide from 1.x to 2.0](https://appium.github.io/appium/docs/en/latest/guides/migrating-1-to-2/) to manage the Appium server.
Appium is in the final stages of a major revision (to version 2.0). As such, the documentation
found around the web may not be correct. The current Appium 2.0 documentation is very much in
progress. Currently, it can be found [here](https://appium.github.io/appium/docs/en/latest/).
### Requirements
- macOS, Linux or Windows operating system
- Node.js 14+
- NPM (Node Package Manager) 8+
These are only server requirements. Each driver might have its own requirements. Consider checking the corresponding driver tutorial for more details.
### Server
To install Appium 2 server using Node Package Manager (npm) run the following command:
```bash
npm install -g appium@next
```
:bangbang: Running `npm install -g appium` would still install Appium 1 because version 2 is in its late beta stage.
### Drivers
### Supported Platforms
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. Since version 2.0
all drivers have been isolated from the Appium server app and can
be managed independently using the [appium driver](https://appiumpro.com/editions/122-installing-appium-20-and-the-driver-and-plugins-cli) command line interface.
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:
In general, the drivers management in Appium 2 is as simple as:
```bash
# To install a new driver from npm
appium driver install --source=npm appium-xcuitest-driver[@<version>]
# To install a driver from a local folder (useful for developers)
appium driver install --source=local /Users/me/sources/appium-xcuitest-driver
# To install a new driver from github (hm, maybe it's time to publish it to NPM?)
appium driver install --source=github appium/appium-xcuitest-driver
# To list already installed drivers
appium driver list --installed
# To update a driver (it must be already installed)
appium driver update xcuitest
# To uninstall a driver (it won't last forever, wouldn't it?)
appium driver uninstall xcuitest
```
You can find a full list of
[officially-supported](https://appium.github.io/appium/docs/en/latest/ecosystem/#drivers) and
[third-party](https://appium.github.io/appium/docs/en/latest/ecosystem/#other-drivers) drivers at
the current Appium 2.0 documentation.
### Plugins
The concept of plugins is something new that has been added exclusively to Appium2. Plugins allow you to extend server functionality without changing the server code. Plugins could be managed similarly to drivers:
```bash
# To install an officially supported plugin
appium plugin install images
# To install a plugin from a local folder (useful for developers)
appium plugin install --source=local /Users/me/sources/images
# To install a new plugin from npm
appium plugin install --source=npm appium-device-farm
# To list already installed plugins
appium plugin list --installed
# To update a plugins (it must be already installed)
appium plugin update appium-device-farm
# To uninstall a plugin
appium plugin uninstall appium-device-farm
```
The main difference between drivers and plugins is that the latter must be explicitly enabled on server startup after it was installed (drivers are enabled by default after installation):
```bash
appium server --use-plugins=device-farm,images
```
You can find a full list of
[officially-supported](https://appium.github.io/appium/docs/en/latest/ecosystem/#plugins) and
[third-party](https://appium.github.io/appium/docs/en/latest/ecosystem/#other-plugins) plugins at
the current Appium 2.0 documentation.
### Server Command Line Interface
In order to start sending commands to Appium over the wire it must be listening
on the URL where your client library expects it to listen.
Use the following commands to run and configure Appium server:
```bash
# Start the server on the default port and host (e.g. http://0.0.0.0:4723/)
appium server
# Start the server on the given port, host and use the base path prefix (the default prefix is /)
appium server -p 9000 -a 127.0.0.1 -pa /wd/hub
# Get the list of all supported command line parameters.
# This list would also include descriptions of driver-specific
# command line arguments for all installed drivers.
# Each driver and plugin must have their command line arguments
# exposed in a special JSON schema declared as a part of the corresponding
# package.json file.
appium server --help
```
Appium supports execution of parallel server processes as well as parallel driver sessions within
single server process. Refer the corresponding driver documentations regarding which mode is optimal
for the particular driver or whether it supports parallel sessions.
* 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 usually don't have to recompile your app or modify it in any way, due
to the use of standard automation APIs on all platforms.
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](https://github.com/appium/java-client),
[JavaScript](https://webdriver.io/), [Python](https://github.com/appium/python-client),
[Ruby](https://github.com/appium/ruby_lib), [C#](https://github.com/appium/dotnet-client)
with the Selenium WebDriver API. There are also various third party
client implementations for other languages.
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. Some drivers, like xcuitest and uiautomator2 ones have 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.
5. You can run your automated tests locally and in a cloud. There are multiple
cloud providers that support various Appium drivers (mostly
targeting iOS and Android mobile automation).
6. [Appium Inspector](https://github.com/appium/appium-inspector) allows
visual debugging of automated tests and could be extremely useful for
beginners.
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
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.
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/Kotlin. Appium opens up the possibility of true cross-platform native app
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!
If you're new to Appium or want a more comprehensive 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).
### Quickstart
### Requirements
Check out our [Quickstart](https://appium.github.io/appium/docs/en/latest/quickstart/) guide
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+.
### Get Started
Check out our [Getting Started](/docs/en/about-appium/getting-started.md) guide
to get going with Appium.
There is also a sample code that contains [many examples of tests in a variety
of different languages](https://github.com/appium/appium/tree/1.x/sample-code)!
There is also a repository that contains [many examples of tests in a variety
of different languages](https://github.com/appium/sample-code)!
### Documentation
For prettily-rendered docs, please visit [Appium Documentation](https://appium.github.io/appium).
You can always find the full list of Appium doc pages at [Appium's GitHub
Repo](https://github.com/appium/appium/tree/master/packages/appium/docs) as well.
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
Please take a look at our [contribution documentation](CONTRIBUTING.md)
for instructions on how to build, test, and run Appium from the source.
for instructions on how to build, test and run Appium from source.
### Roadmap
@@ -195,17 +98,19 @@ Interested in where Appium is heading in the future? Check out the [Roadmap](ROA
### Project History, Credits & Inspiration
* [History](https://appium.github.io/appium/docs/en/latest/intro/history/)
* [History](http://appium.io/history)
* [Credits](/docs/en/contributing-to-appium/credits.md)
### 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/writing-running-appium/other/troubleshooting.md).
Please have a look here first if you run into any problems. It contains instructions for checking
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.
+2 -2
View File
@@ -23,7 +23,9 @@ exists to outline large-scale future plans for Appium.
| Project | Description |
|---------|-------------|
|[Onboarding Overhaul](https://github.com/appium/appium/issues/7169)|The current Appium docs leave a lot to be desired. The format is confusing (it would be better for API docs), the content is outdated, and many things are still undocumented. This project would go back to the drawing board in all of these areas and put together something genuinely helpful for the community, which hopefully reduces the kind of support issues we're currently flooded by.|
|[Appium Client Library Updates](https://github.com/appium/appium/issues/7170)|It's been too long since we ensured that Appium's client libraries were up to date with the server|
|[Sample Code Overhaul](https://github.com/appium/appium/issues/7171)|Our sample code repo has grown tangled and broken. Let's make a new one with minimal examples which are the same across every language, and actually maintain the repo so as not to let it become overgrown.|
|[Test App Overhaul](https://github.com/appium/appium/issues/7172)|Our current test applications (the ones used to test Appium's iOS and Android support) are not ideal. We use too many of them and the ones we use have a random hodgepodge of app SDK features, sometimes not enough to sufficiently test automation support. It'd be great to find a way to ensure our test app(s) have all the features we need to test, and keep in sync with our requirements.|
|[iOS Test Startup Time Improvement](https://github.com/appium/appium/issues/7173)|iOS startup times have gotten progressively longer with each iOS release. In part this is Apple's fault and there's not anything we can do about it. But we should investigate and see if we can be more efficient in how we start, especially given that we can now focus on XCUITest and leave Instruments behind|
|[Appium Dearchitecture](https://github.com/appium/appium/issues/7174)|OK, we went a bit overboard in Appium 1.5 by exploding Appium into 40+ repos and NPM packages. Let's think a little more critically about it and consolidate into the minimal number of repos/packages that make sense for our code and community patterns.|
@@ -41,8 +43,6 @@ exists to outline large-scale future plans for Appium.
| Project | Description | Completed | Appium Release | Notes |
|---------|-------------|-----------|----------------|-------|
|[Sample Code Overhaul](https://github.com/appium/appium/issues/7171)|Our sample code repo has grown tangled and broken. Let's make a new one with minimal examples which are the same across every language, and actually maintain the repo so as not to let it become overgrown.|
|[Onboarding Overhaul](https://github.com/appium/appium/issues/7169)|Have a new site built with MkDocs that documents all of the Selenium and Appium commands with code samples|1/2018|n/a|appium.io|
|[New Appium GUIs](https://github.com/appium/appium/issues/7167)|The current Appium GUIs (Appium.app and Appium.exe) have a number of issues. They aren't maintained by the core Appium team. They're written in Objective-C and C# respectively: two languages, and specifically, two languages other than Appium's core language. Because of this they lag behind the Appium server and are often broken. However, users love them primarily because of the Inspector feature (the thing that lets them graphically navigate their app), so we have to field a ton of complaints about these projects. There's an opportunity to start over. With [Electron](http://electron.atom.io/), we'd be able to take the new version of Appium we're working on and embed it directly inside a Node-based GUI app written using the languages and technologies the core team is experienced with. We'd have one codebase and could distribute the app on Mac, Windows, and Linux. The GUIs would become an official part of Appium's release cycle so they wouldn't be broken.|3/2017|N/A|[Appium Desktop website](https://github.com/appium/appium-desktop)|
|[Android 7.1.1 Support](https://github.com/appium/appium/issues/7165)|Google has released Android 7.1.1 (API Level 25). Ensure it works with UiAutomator 1/2|2/2017|1.6.4||
|[Android 7.0 Support](https://github.com/appium/appium/issues/7156)|Support Android 7 (Nougat)|11/2016|1.6.3||
+71
View File
@@ -0,0 +1,71 @@
#!/usr/bin/env node
/* eslint no-console:0 */
/*
* Small tool, launching and monitoring ios-web-kit-proxy, and relauching
* on predefined errors.
*
* Usage:
* ./bin/ios-webkit-debug-proxy-launcher.js [args]
* args: ios-webkit-debug-proxy args (they will be passed over)
*
* Example:
* ./bin/ios-webkit-debug-proxy-launcher.js -c <UDID>:27753 -d
*
* Note:
* For iOS8.1 try this first:
* brew install --HEAD ideviceinstaller
*/
"use strict";
const spawn = require('child_process').spawn;
const _ = require('lodash');
const args = process.argv.slice(2);
const RESTART_ON_MESSAGES = [
'Invalid message _rpc_applicationUpdated',
'Invalid message _rpc_applicationSentListing'];
const PROXY_CMD = 'ios_webkit_debug_proxy';
let proxy;
const handleKillProcess = function (exitCode) {
console.log('\nKilling proxy process!');
proxy.kill('SIGTERM');
process.exit((exitCode || 0));
};
const startProxy = function () {
console.log('RUNNING:', PROXY_CMD, args.join(' '));
proxy = spawn(PROXY_CMD, args);
proxy.stdout.on('data', function (data) {
console.log('stdout: ' + data);
});
proxy.stderr.on('data', function (data) {
console.log('stderr: ' + data);
const restartMessage = _(RESTART_ON_MESSAGES).find(function (message) {
return ('' + data).indexOf(message) >= 0;
});
if (restartMessage) {
console.log('Detected error message:', restartMessage);
console.log('Killing proxy!');
proxy.kill('SIGTERM');
process.nextTick(startProxy);
}
});
proxy.on('close', function (code) {
console.log('child process exited with code ' + code);
});
};
process.on('SIGINT', handleKillProcess);
process.on('SIGTERM', handleKillProcess);
startProxy();
+3
View File
@@ -0,0 +1,3 @@
{
"presets": ["env"]
}
+15
View File
@@ -0,0 +1,15 @@
## Appium API Documentation
<div class="api-index">
{{#*inline "commands"}}
{{#each commands}}
<li>
{{#if path}}<a href='{{path}}'>{{name}}</a>{{else}}{{name}}<ul>{{>commands}}</ul>{{/if}}
</li>
{{/each}}
{{/inline}}
<ul>
{{>commands}}
</ul>
</div>
@@ -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: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#current_context-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: 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: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#available_contexts-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: 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.set_context(webview)
# ...
@driver.set_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: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#set_context-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: 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:
|
$activity = $driver->currentActivity();
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_core/Appium/Core/Device#current_activity-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: 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_core/Appium/Core/Device#current_package-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: 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,98 @@
---
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 app_package: "com.example", app_activity: "ActivityName"
php:
|
$driver->startActivity(array('appPackage' => 'com.example',
'appActivity' => 'ActivityName'));
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_core/Appium/Android/Device#start_activity-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: 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,94 @@
---
name: Background App
short_description: Send the currently running app for this session to the background
description:
>
Send the currently active app to the background, and either return after a
certain amount of time, or leave the app deactivated.
There are 3 types of parameters which may be passed to this method:
1. An object that looks like `{"timeout": secs}`, where `secs` is an
integer designating how long, in seconds, to background the app for. -1
means to deactivate the app entirely.
2. `null`, which means to deactivate the app entirely.
3. _Deprecated_ An integer: how long, in seconds, to background the app for. -1 means to
deactivate the app entirely.
iOS tests with XCUITest can also use the `mobile: terminateApp` method to
terminate the current app (see detailed [documentation](/docs/en/writing-running-appium/ios/ios-xctest-mobile-apps-management.md#mobile-terminateapp)),
and the `mobile: activateApp` to activate an existing application on the
device under test and moves it to the foreground (see detailed [documentation](/docs/en/writing-running-appium/ios/ios-xctest-mobile-apps-management.md#mobile-activateapp)).
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:
|
$driver->backgroundApp(10);
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_core/Appium/Core/Device#background_app-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: 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:
|
$driver->closeApp();
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: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#close_app-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: 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:
|
$driver->endTestCoverage('Intent', '/path');
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_core/Appium/Android/Device#end_coverage-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: 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:
|
$strings = $driver->appStrings();
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_core/Appium/Core/Device#app_strings-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: 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,77 @@
---
name: Install App
short_description: Install the given app onto the device
description:
>
iOS tests with XCUITest can also use the `mobile: installApp` method. See
detailed [documentation](/docs/en/writing-running-appium/ios/ios-xctest-mobile-apps-management.md#mobile-installapp).
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:
|
$driver->installApp('/Users/johndoe/path/to/app.apk');
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: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#install_app-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: 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,80 @@
---
name: Is App Installed
short_description: Check whether the specified app is installed on the device
description:
>
iOS tests with XCUITest can also use the `mobile: isAppInstalled` method. See
detailed [documentation](/docs/en/writing-running-appium/ios/ios-xctest-mobile-apps-management.md#mobile-isappinstalled).
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:
|
$driver->isAppInstalled('com.example.AppName')
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: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#app_installed%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
# 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,73 @@
---
name: Launch an App
short_description: Launch an app on device
description:
>
iOS tests with XCUITest can also use the `mobile: launchApp` method. See
detailed [documentation](/docs/en/writing-running-appium/ios/ios-xctest-mobile-apps-management.md#mobile-launchapp).
example_usage:
java:
|
driver.launchApp();
python:
|
self.driver.launch_app()
javascript_wd:
|
await driver.launchApp();
javascript_wdio:
|
driver.launch();
ruby:
|
@driver.launch_app
php:
|
$driver->launchApp();
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_core/Appium/Core/Device#launch_app-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: 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,81 @@
---
name: Remove App
short_description: Remove an app from the device
description:
>
iOS tests with XCUITest can also use the `mobile: removeApp` method. See
detailed [documentation](/docs/en/writing-running-appium/ios/ios-xctest-mobile-apps-management.md#mobile-removeapp).
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:
|
$driver->removeApp('com.example.AppName');
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: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#remove_app-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: 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:
|
$driver->reset();
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: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#reset-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: 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:
|
$data = $driver->pullFile('data/local/tmp/file.txt');
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_core/Appium/Core/Device#pull_file-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: 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:
|
$folderBase64 = $driver->pullFolder($path);
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_core/Appium/Core/Device#pull_folder-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: 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('/path/to/device/foo.bar', 'QXJlIHlvdXIgYmVlcnMgb2theT8=')
php:
|
$driver->pushFile('/path/to/device/foo.bar', 'QXJlIHlvdXIgYmVlcnMgb2theT8=');
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_core/Appium/Core/Device#push_file-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: 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_core/Appium/Core/Device#device_locked%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
# 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,76 @@
---
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
@driver.lock(5) # lock 5 seconds
php:
|
$driver->lock(5);
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: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#lock-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: 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:
|
$driver->shake();
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_core/Appium/Core/Device#shake-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 (simulator only)
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,72 @@
---
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();
ruby:
|
@driver.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"
ruby: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#unlock-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: 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,85 @@
---
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:
|
$driver->hideKeyboard();
$driver->hideKeyboard(array(
'keyName' => 'Done'
));
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: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#hide_keyboard-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: 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: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#is_keyboard_shown-instance_method"
# 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_core/Appium/Core/Device#long_press_keycode-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: 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_core/Appium/Core/Device#press_keycode-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: 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_core/Appium/Core/Device#toggle_flight_mode-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: 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 package_name: 'io.appium.android.apis', data_type: 'cpuinfo', data_read_timeout: 10
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_core/Appium/Android/Device#get_performance_data-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: 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_core/Appium/Android/Device#get_performance_data_types-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: 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: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Ios/Device#toggle_touch_id_enrollment-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: 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_core/Appium/Ios/Device#touch_id-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: 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:
|
$driver->openNotifications();
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: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#open_notifications-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: 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_core/Appium/Core/Device#get_system_bars-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: 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:
|
$time = $driver->getDeviceTime();
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: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#device_time-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: 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:
|
$driver->byAccessibilityId('SomeId')->click();
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,84 @@
---
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:
|
$el = $this->byAccessibilityId('SomeAccessibilityID');
$el->setText('Hello world!');
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,80 @@
---
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:
|
$el = $this->byAccessibilityId('SomeAccessibilityID');
$name = $el->attribute('name');
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,78 @@
---
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:
|
$el = $this->byAccessibilityId('SomeAccessibilityID');
$isDisplayed = $el->displayed();
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,83 @@
---
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:
|
$el = $this->byAccessibilityId('SomeAccessibilityID');
$location = $el->location();
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,74 @@
---
name: Get Tag Name
short_description: Get an element's tag name
example_usage:
java:
|
// TODO Java sample
python:
|
// TODO Python sample
javascript_wd:
|
// TODO javascript_wd sample
javascript_wdio:
|
// TODO javascript_wdio sample
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#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/element/:element_id/pageIndex
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:
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/mjsonwp/routes.js#L285
@@ -0,0 +1,81 @@
---
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");
ruby:
|
element = @driver.find_element :accessibility_id, "SomeAccessibilityID"
element.rect
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"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/Element#rect-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/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,79 @@
---
name: Replace the value
short_description: Replace the value to element directly
description:
>
Replace the value to element directly.
example_usage:
java:
|
// TODO Java sample
python:
|
// TODO: Python example
javascript_wd:
|
// TODO JavaScript sample
javascript_wdio:
|
// TODO JavaScript sample
ruby:
|
element = @driver.find_element :accessibility_id, "SomeAccessibilityID"
@driver.replace_value element, 'some'
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--" # TODO Java documentation link
python: "http://selenium-python.readthedocs.io/api.html" # TODO Python documentation link
javascript_wdio: "http://webdriver.io/api/property/getText.html" # TODO JAvaScript documentation link
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L1832" # TODO JAvaScript documentation link
ruby: "http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device#replace_value-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/appium/element/:element_id/replace_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
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:
jsonwp: https://github.com/appium/appium-base-driver/blob/master/lib/mjsonwp/routes.js#L451
@@ -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,83 @@
---
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:
|
$el = $this->byAccessibilityId('SomeAccessibilityID');
$size = $el->size();
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,80 @@
---
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('SomeAccessibilityID')
text = el.text
javascript_wd:
|
let element = await driver.elementByAccessibilityId("SomeAccessibilityID");
await element.submit();
javascript_wdio:
|
driver.getText("~SomeAccessibilityId");
ruby:
|
element = @driver.find_element :accessibility_id, "SomeAccessibilityID"
element.text
php:
|
$el = $this->byAccessibilityId('SomeAccessibilityID');
$text = $el->text();
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/Element#text-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/: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.md#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:
|
$el = $this->byAccessibilityId('SomeAccessibilityID');
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/writing-running-appium/finding-elements.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(:accessibility_id, "~SomeAccessibilityID")
php:
|
$els = $this->elements($this->using('accessibility id')->value('SomeAccessibilityID'));
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:
|
@driver.switch_to.active_element
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/0.0.28/Selenium/WebDriver/TargetLocator#active_element-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: 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,84 @@
---
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:
|
element1 = @driver.find_element :class_name, "someClass"
element2 = @driver.find_element :class_name, "someOtherClass"
element1 == element2
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/0.0.28/Selenium/WebDriver/Element#==-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: false
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,78 @@
---
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:
|
element = @driver.find_element :class_name, "someClass"
element.submit element
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/0.0.28/Selenium/WebDriver/Element#submit-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: 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

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