mirror of
https://github.com/appium/appium.git
synced 2026-11-11 04:23:55 +08:00
Compare commits
9
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4bf6c6e8fc | ||
|
|
b0f1e56ede | ||
|
|
b0857eefb1 | ||
|
|
8efff6895e | ||
|
|
69eed603c3 | ||
|
|
f91c6b50aa | ||
|
|
46395d7c46 | ||
|
|
5a2cf8d1c4 | ||
|
|
281b3cfdeb |
+1
-8
@@ -1,9 +1,2 @@
|
||||
**/coverage/**
|
||||
**/node_modules/**
|
||||
examples/javascript-wd
|
||||
**/build/**
|
||||
**/*.min.js
|
||||
sample-code
|
||||
**/*.d.ts
|
||||
**/build-fixtures/**
|
||||
**/*.ts
|
||||
coverage
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
-40
@@ -1,40 +0,0 @@
|
||||
# Generated by FOSSA CLI (https://github.com/fossas/fossa-cli)
|
||||
# Visit https://fossa.com to learn more
|
||||
|
||||
version: 3
|
||||
|
||||
project:
|
||||
id: github.com/appium/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/gulp-plugins
|
||||
- type: npm
|
||||
path: ./packages/support
|
||||
- type: npm
|
||||
path: ./packages/test-support
|
||||
|
||||
revision:
|
||||
branch: 2.0
|
||||
@@ -1 +0,0 @@
|
||||
* text=auto eol=lf
|
||||
@@ -8,7 +8,6 @@ Briefly describe the issue you are experiencing (or the feature you want to see
|
||||
* 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):
|
||||
* Npm or Yarn package manager:
|
||||
* Mobile platform/version under test:
|
||||
* Real device or emulator/simulator:
|
||||
* Appium CLI or Appium.app|exe:
|
||||
@@ -19,8 +18,8 @@ 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!
|
||||
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!
|
||||
|
||||
|
||||
@@ -28,6 +27,6 @@ If you are reporting a bug, _always_ include Appium logs!
|
||||
|
||||
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/appium and from the `examples` directory, use one of your favourite languages and sample apps to reproduce the issue.
|
||||
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 examples, please submit a PR with one of the sample apps provided.
|
||||
In case a similar scenario is missing in sample-code, please submit a PR with one of the sample apps provided.
|
||||
|
||||
@@ -10,7 +10,6 @@ _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
|
||||
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: npm
|
||||
directory: "/sample-code/javascript-webdriverio"
|
||||
schedule:
|
||||
interval: daily
|
||||
time: "11:00"
|
||||
open-pull-requests-limit: 10
|
||||
- package-ecosystem: npm
|
||||
directory: "/sample-code/javascript-wd"
|
||||
schedule:
|
||||
interval: daily
|
||||
time: "11:00"
|
||||
open-pull-requests-limit: 10
|
||||
- package-ecosystem: npm
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: daily
|
||||
time: "11:00"
|
||||
open-pull-requests-limit: 10
|
||||
@@ -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
|
||||
@@ -1,54 +0,0 @@
|
||||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: Appium Build
|
||||
on: [push, pull_request]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Test
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [14.x, 16.x, 18.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 # tag=v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Install latest npm
|
||||
run: npm install -g npm
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
npm install
|
||||
npm run install-mjpeg-consumer
|
||||
- name: Run all tests
|
||||
run: npm run test:ci
|
||||
|
||||
lint:
|
||||
name: Lint & Check Types
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
- name: ESLint
|
||||
run: npm run lint
|
||||
- name: Check types
|
||||
run: npm run build:types
|
||||
|
||||
docs:
|
||||
name: Build Command Documentation
|
||||
needs: [test]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
- name: Generate docs
|
||||
run: npm run generate-docs
|
||||
@@ -1,24 +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@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
|
||||
with:
|
||||
ref: '2.0'
|
||||
- name: fossa analyze
|
||||
run: |
|
||||
npm install
|
||||
curl -sS -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bash
|
||||
fossa analyze
|
||||
fossa test
|
||||
env:
|
||||
FOSSA_API_KEY: ${{secrets.FOSSA_API_KEY}}
|
||||
+2
-29
@@ -3,15 +3,14 @@
|
||||
.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
|
||||
@@ -25,39 +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
|
||||
|
||||
-10
@@ -1,10 +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,
|
||||
};
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
assets/
|
||||
submodules/
|
||||
test/
|
||||
_vimrc_local.vim
|
||||
*.swp
|
||||
*.swo
|
||||
*~
|
||||
.*~
|
||||
.DS_Store
|
||||
.travis.yml
|
||||
*.log
|
||||
*.trace
|
||||
*.sublime-
|
||||
*.prefs
|
||||
./.npmignore
|
||||
coverage
|
||||
@@ -1,4 +1 @@
|
||||
# Do not disable package-lock. Disabling package-lock also disables npm-shrinkwrap
|
||||
package-lock=true
|
||||
save-exact=true
|
||||
|
||||
package-lock=false
|
||||
@@ -1,12 +0,0 @@
|
||||
**/node_modules/**
|
||||
**/build/**
|
||||
**/fixtures/**
|
||||
**/*.min.*
|
||||
**/*.md
|
||||
**/*.yml
|
||||
**/*.json
|
||||
**/.vscode/**
|
||||
**/*.html
|
||||
**/generated/**
|
||||
# generated
|
||||
packages/types/lib/appium-config.ts
|
||||
+15
@@ -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
|
||||
Vendored
-23
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"args": ["--colors", "--timeout", "0", "${file}"],
|
||||
"internalConsoleOptions": "openOnSessionStart",
|
||||
"name": "Test - Current File",
|
||||
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
|
||||
"runtimeArgs": ["--require", "@babel/register"],
|
||||
"request": "launch",
|
||||
"skipFiles": ["<node_internals>/**", "**/node_modules/mocha/**"],
|
||||
"type": "pwa-node",
|
||||
"sourceMaps": true,
|
||||
"cwd": "${workspaceFolder}",
|
||||
"outfiles": [],
|
||||
"env": {
|
||||
"NODE_ENV": "test",
|
||||
"BABEL_ENV": "test"
|
||||
},
|
||||
"autoAttachChildProcesses": true,
|
||||
}
|
||||
]
|
||||
}
|
||||
Vendored
-14
@@ -1,14 +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
|
||||
}
|
||||
]
|
||||
}
|
||||
-61
@@ -1,61 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = (wallaby) => {
|
||||
return {
|
||||
compilers: {
|
||||
'**/*.js': wallaby.compilers.babel(),
|
||||
},
|
||||
debug: true,
|
||||
env: {
|
||||
type: 'node',
|
||||
},
|
||||
files: [
|
||||
'./packages/**/*.js',
|
||||
'./packages/**/*.json',
|
||||
'!./packages/**/build/**',
|
||||
'!./packages/**/test/**/*-specs.js',
|
||||
'!./packages/**/test/**/*.spec.js',
|
||||
'!./packages/*/node_modules/**',
|
||||
'!./packages/*/gulpfile.js',
|
||||
'!./packages/*/scripts/**',
|
||||
'./packages/*/test/**/fixtures/**/*',
|
||||
'./babel.config.json',
|
||||
// below this are fixtures
|
||||
{
|
||||
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/**/*',
|
||||
},
|
||||
'!**/local_appium_home/**',
|
||||
],
|
||||
testFramework: 'mocha',
|
||||
tests: ['./packages/*/test/unit/**/*.spec.js'],
|
||||
workers: {
|
||||
restart: true,
|
||||
},
|
||||
setup() {
|
||||
// This copied out of `./test/setup.js`, which uses `@babel/register`.
|
||||
// Wallaby doesn't need `@babel/register` (and it probably makes Wallaby slow),
|
||||
// but we need the other stuff, so here it is.
|
||||
|
||||
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();
|
||||
},
|
||||
runMode: 'onsave',
|
||||
};
|
||||
};
|
||||
+5
-1139
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -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!
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -1,14 +1,18 @@
|
||||
## Appium
|
||||
|
||||
[](https://npmjs.org/package/appium)
|
||||
[](https://github.com/appium/appium/actions/workflows/node.js.yml)
|
||||
[](https://david-dm.org/appium/appium)
|
||||
[](https://david-dm.org/appium/appium#info=devDependencies)
|
||||
|
||||
[](https://npmjs.org/package/appium)
|
||||
[](http://issuestats.com/github/appium/appium)
|
||||
[](http://issuestats.com/github/appium/appium)
|
||||
|
||||
[](https://team-appium.ci.cloudbees.com/job/Appium/)
|
||||
[](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fappium%2Fappium?ref=badge_shield)
|
||||
|
||||
Appium is an open-source, cross-platform test automation tool for native,
|
||||
hybrid, and mobile web and desktop apps. We support simulators (iOS), emulators
|
||||
Appium is an open source, cross-platform test automation tool for native,
|
||||
hybrid and mobile web and desktop apps. We support simulators (iOS), emulators
|
||||
(Android), and real devices (iOS, Android, Windows, Mac).
|
||||
|
||||
Want to skip straight to the action? Check out our [getting
|
||||
@@ -25,16 +29,17 @@ specific information about how that driver works and how to set it up:
|
||||
* The [XCUITest Driver](/docs/en/drivers/ios-xcuitest.md)
|
||||
* (DEPRECATED) The [UIAutomation Driver](/docs/en/drivers/ios-uiautomation.md)
|
||||
* Android
|
||||
* The [Espresso Driver](/docs/en/drivers/android-espresso.md)
|
||||
* (BETA) The [Espresso Driver](/docs/en/drivers/android-espresso.md)
|
||||
* The [UiAutomator2 Driver](/docs/en/drivers/android-uiautomator2.md)
|
||||
* (DEPRECATED) The [UiAutomator Driver](/docs/en/drivers/android-uiautomator.md)
|
||||
* (DEPRECATED) The [Selendroid Driver](/docs/en/drivers/android-selendroid.md)
|
||||
* The [Windows Driver](/docs/en/drivers/windows.md) (for Windows Desktop apps)
|
||||
* The [Mac Driver](/docs/en/drivers/mac.md) (for Mac Desktop apps)
|
||||
|
||||
### Why Appium?
|
||||
|
||||
1. You don't have to recompile your app or modify it in any way, due
|
||||
to the use of standard automation APIs on all platforms.
|
||||
to use of standard automation APIs on all platforms.
|
||||
2. You can write tests with your favorite dev tools using any
|
||||
[WebDriver](https://w3c.github.io/webdriver/webdriver-spec.html)-compatible
|
||||
language such as Java, Objective-C, JavaScript (Node), PHP, Python, Ruby,
|
||||
@@ -42,22 +47,22 @@ specific information about how that driver works and how to set it up:
|
||||
client libraries](/docs/en/about-appium/appium-clients.md).
|
||||
3. You can use any testing framework.
|
||||
4. Appium has built-in mobile web and hybrid app support. Within the same
|
||||
script, you can switch seamlessly between native app automation and webview
|
||||
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
|
||||
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).
|
||||
|
||||
@@ -66,15 +71,15 @@ Concepts](/docs/en/about-appium/intro.md).
|
||||
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 10+.
|
||||
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/master/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
|
||||
|
||||
@@ -82,16 +87,10 @@ 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.
|
||||
|
||||
[update-appium-io.yml](https://github.com/appium/appium/blob/master/ci-jobs/update-appium-io.yml) creates a PR
|
||||
by [CI job](https://dev.azure.com/AppiumCI/Appium%20CI/_build?definitionId=37).
|
||||
in the appium.io repository with the documentation update.
|
||||
|
||||
Once the PR has been merged, the latest documentation will be in [appium.io](http://appium.io)
|
||||
|
||||
### 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
|
||||
|
||||
@@ -110,7 +109,7 @@ 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
|
||||
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
@@ -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||
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
{
|
||||
"presets": [
|
||||
[
|
||||
"@babel/preset-env",
|
||||
{
|
||||
"targets": {
|
||||
"node": "12"
|
||||
},
|
||||
"shippedProposals": true
|
||||
}
|
||||
]
|
||||
],
|
||||
"plugins": ["source-map-support", "@babel/plugin-transform-runtime"],
|
||||
"comments": false,
|
||||
"sourceMaps": "both",
|
||||
"env": {
|
||||
"coverage": {
|
||||
"plugins": [
|
||||
[
|
||||
"istanbul",
|
||||
{
|
||||
"exclude": ["test", "build"]
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"test": {
|
||||
"retainLines": true,
|
||||
"comments": true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
Binary file not shown.
@@ -1,40 +0,0 @@
|
||||
# parameters: # No params yet, but may add later
|
||||
jobs:
|
||||
- job: generate_docs
|
||||
pool:
|
||||
vmImage: "macOS 10.14"
|
||||
variables:
|
||||
CC: gcc
|
||||
CXX: g++
|
||||
steps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: '12.x'
|
||||
- script: |
|
||||
# do git stuff
|
||||
npm install
|
||||
brew install hub
|
||||
hub --version
|
||||
git remote add triager https://triager:$GITHUB_TOKEN@github.com/appium/appium
|
||||
git checkout -b generate-docs-$BUILD_SOURCEVERSION
|
||||
git status
|
||||
displayName: Checkout Generate Docs Branch
|
||||
env:
|
||||
GITHUB_TOKEN: $(GITHUB_TOKEN)
|
||||
- script: |
|
||||
# Generate the docs
|
||||
npm run generate-docs
|
||||
git add .
|
||||
|
||||
# log the status so we know what is going on, on failure
|
||||
git status -s
|
||||
|
||||
# If docs were generated, make a PR to update the docs
|
||||
if [[ -n $(git status -s) ]]; then
|
||||
git commit -a -n -m 'Update generated docs [ci skip]'
|
||||
git push triager generate-docs-$BUILD_SOURCEVERSION
|
||||
hub pull-request -b "appium:master" -h "appium:generate-docs-$BUILD_SOURCEVERSION" -m "docs: Update auto-generated docs"
|
||||
fi
|
||||
displayName: Generate Docs and Make PR
|
||||
env:
|
||||
GITHUB_TOKEN: $(GITHUB_TOKEN)
|
||||
@@ -1,2 +0,0 @@
|
||||
jobs:
|
||||
- template: templates/bundle-template.yml
|
||||
@@ -1,3 +0,0 @@
|
||||
const semver = require('semver');
|
||||
const {version} = require('../../package.json');
|
||||
console.log(semver(version).prerelease[0]); //eslint-disable-line no-console
|
||||
@@ -1,22 +0,0 @@
|
||||
const path = require('path');
|
||||
const {fs, logger} = require('appium-support');
|
||||
const {asyncify} = require('asyncbox');
|
||||
const packageJson = require('../../package.json');
|
||||
|
||||
const log = new logger.getLogger('Create Release Branch:');
|
||||
|
||||
async function setPackageJsonVersion(version = `${process.env.MINOR_BRANCH_NAME}.0-rc.0`) {
|
||||
packageJson.version = version;
|
||||
log.info(`Setting version to: ${version}`);
|
||||
await fs.writeFile(
|
||||
path.resolve(__dirname, '..', '..', 'package.json'),
|
||||
JSON.stringify(packageJson, null, 2),
|
||||
'utf8'
|
||||
);
|
||||
}
|
||||
|
||||
if (require.main === module) {
|
||||
asyncify(setPackageJsonVersion);
|
||||
}
|
||||
|
||||
module.exports = setPackageJsonVersion;
|
||||
@@ -1,40 +0,0 @@
|
||||
# parameters: # No params yet, but may add later
|
||||
jobs:
|
||||
- job: bundle_and_upload_appium_zip
|
||||
pool:
|
||||
vmImage: 'macOS 10.14'
|
||||
variables:
|
||||
CC: gcc
|
||||
CXX: g++
|
||||
steps:
|
||||
- script: gcc --version
|
||||
displayName: Print GCC Version
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: '12.x'
|
||||
- script: npm install
|
||||
displayName: Install NPM Dependencies
|
||||
- script: npm run build
|
||||
displayName: npm run build
|
||||
- script: npm prune --production
|
||||
displayName: Get rid of dev dependencies
|
||||
- script: |
|
||||
curl -o node-darwin.tar.gz https://nodejs.org/dist/v12.16.1/node-v12.16.1-darwin-x64.tar.gz
|
||||
mkdir node-darwin-unpacked
|
||||
tar -xzf node-darwin.tar.gz -C node-darwin-unpacked/ --strip-components 1
|
||||
rm -f node-darwin.tar.gz
|
||||
cp node-darwin-unpacked/bin/node node-darwin
|
||||
rm -rf node-darwin-unpacked
|
||||
displayName: Download NodeJS
|
||||
- script: npm run zip
|
||||
displayName: Create the bundle zip
|
||||
- script: npm install
|
||||
displayName: Reinstall dev dependencies
|
||||
- task: PublishPipelineArtifact@0
|
||||
inputs:
|
||||
targetPath: appium.zip
|
||||
artifactName: appium
|
||||
- script: npm run upload
|
||||
env:
|
||||
GITHUB_TOKEN: $(GITHUB_TOKEN)
|
||||
displayName: Upload to appium/appium-build-store Github Releases
|
||||
@@ -1,31 +0,0 @@
|
||||
# parameters: # No params yet, but may add later
|
||||
jobs:
|
||||
- job: update_appium_io
|
||||
pool:
|
||||
vmImage: 'Ubuntu-18.04'
|
||||
variables:
|
||||
CC: gcc
|
||||
CXX: g++
|
||||
steps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: '10.x'
|
||||
- script: |
|
||||
pip install mkdocs==0.16.3
|
||||
git config --global user.email "maintainers@appium.io"
|
||||
git config --global user.name "Appium Triager"
|
||||
git clone https://triager:$GITHUB_TOKEN@github.com/appium/appium.io.git --branch=gh-pages
|
||||
pushd appium.io
|
||||
git remote add triager https://triager:$GITHUB_TOKEN@github.com/appium/appium.io
|
||||
git checkout -b docs-$BUILD_SOURCEVERSION
|
||||
bundle install
|
||||
npm install
|
||||
npm run build:docs
|
||||
git add docs
|
||||
git commit -a -n -m "docs: Update documentation for latest version"
|
||||
git push triager docs-$BUILD_SOURCEVERSION
|
||||
hub pull-request -b "appium:gh-pages" -h "appium:docs-$BUILD_SOURCEVERSION" -m "docs: Update documentation for latest version"
|
||||
popd
|
||||
displayName: Make branch with Updated Docs and make PR
|
||||
env:
|
||||
GITHUB_TOKEN: $(GITHUB_TOKEN)
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"presets": ["env"]
|
||||
}
|
||||
@@ -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
|
||||
@@ -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
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user