mirror of
https://github.com/appium/appium.git
synced 2026-11-03 07:34:36 +08:00
Compare commits
126
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f5cce0f29d | ||
|
|
96fd7782eb | ||
|
|
56f5c87d91 | ||
|
|
9fb03950d6 | ||
|
|
7f6d9f54fc | ||
|
|
3ee93ba5bd | ||
|
|
c1054c7996 | ||
|
|
c5164f7743 | ||
|
|
6ca1191bb2 | ||
|
|
f947828e9b | ||
|
|
0ebdd0ed78 | ||
|
|
840e5a767c | ||
|
|
a2fc58cd93 | ||
|
|
c8ee934718 | ||
|
|
0b4dad2f4c | ||
|
|
799fb87be3 | ||
|
|
970017b208 | ||
|
|
43d36bb60c | ||
|
|
06a8fe467c | ||
|
|
ad0814532b | ||
|
|
3add8c0906 | ||
|
|
3648ed017b | ||
|
|
37c25e4546 | ||
|
|
11fb7c1a2e | ||
|
|
297a307725 | ||
|
|
1cc5a9e2cc | ||
|
|
7b6159cf2f | ||
|
|
28a14da729 | ||
|
|
54b1f5276a | ||
|
|
8c3cca06e5 | ||
|
|
84eb71fb0f | ||
|
|
d1e0043e37 | ||
|
|
b57115b2f0 | ||
|
|
3a6b3c7788 | ||
|
|
92d7359763 | ||
|
|
9fc213aa7d | ||
|
|
c5560ab238 | ||
|
|
adcc2a28e9 | ||
|
|
94fe0f2ef8 | ||
|
|
9608fd74af | ||
|
|
eb378bf47e | ||
|
|
2de0e383cc | ||
|
|
0f0616523e | ||
|
|
b4b4204818 | ||
|
|
3ce313ebb9 | ||
|
|
a00119405a | ||
|
|
4b9bfb35aa | ||
|
|
c653d2cf3b | ||
|
|
46942e0423 | ||
|
|
d9fd258eee | ||
|
|
a80e4b85a4 | ||
|
|
5be33381fd | ||
|
|
1dbeee2006 | ||
|
|
1097fde0fc | ||
|
|
2781805c05 | ||
|
|
868517b6f4 | ||
|
|
bfdbb4cc92 | ||
|
|
cfd7cdbb7d | ||
|
|
9829e69333 | ||
|
|
f9de06341d | ||
|
|
2fbd49fed4 | ||
|
|
d89fb9b354 | ||
|
|
37e7b8266c | ||
|
|
4ef3323d1a | ||
|
|
1b29920485 | ||
|
|
1954021af9 | ||
|
|
891d601ee7 | ||
|
|
493c48d190 | ||
|
|
16b2e8f14b | ||
|
|
5abf852046 | ||
|
|
9e41fc210e | ||
|
|
ad08384e53 | ||
|
|
2e15c85f44 | ||
|
|
2ed1fa8abc | ||
|
|
3c7ac49478 | ||
|
|
83493941ee | ||
|
|
a8315f3f87 | ||
|
|
79772d7a4f | ||
|
|
1165269644 | ||
|
|
632b75227c | ||
|
|
5aae1ae8a7 | ||
|
|
a881ae992a | ||
|
|
ed50a38657 | ||
|
|
42f4a2de2d | ||
|
|
555b93bf55 | ||
|
|
9bb88e0ac8 | ||
|
|
7470ed00b2 | ||
|
|
eac88e5038 | ||
|
|
ca90a11813 | ||
|
|
7d8d547fbd | ||
|
|
40a6f054dc | ||
|
|
d69fc6002c | ||
|
|
af96879cfd | ||
|
|
9a85a41b9e | ||
|
|
bc86e2800e | ||
|
|
25087c3ee0 | ||
|
|
ab9e2458ee | ||
|
|
fa453a18db | ||
|
|
e074fee89f | ||
|
|
20d95e4531 | ||
|
|
86e5dc304e | ||
|
|
7b3893a362 | ||
|
|
f51094157d | ||
|
|
0db3ec49f8 | ||
|
|
62f1894838 | ||
|
|
eafd06fa5a | ||
|
|
80e77e2681 | ||
|
|
e947204351 | ||
|
|
1e4c3e6f6d | ||
|
|
07887b7c18 | ||
|
|
88e351fc2d | ||
|
|
e7801b60e1 | ||
|
|
daed9be750 | ||
|
|
58d408550f | ||
|
|
c03d98b4ee | ||
|
|
618f4ebb87 | ||
|
|
74a5911515 | ||
|
|
280d409df6 | ||
|
|
0e7b19aabe | ||
|
|
221a3ecd52 | ||
|
|
5df02abe0a | ||
|
|
3e61d93769 | ||
|
|
5a2b981fb7 | ||
|
|
cfa7f003b8 | ||
|
|
254923b471 | ||
|
|
9e75670035 |
+5
-3
@@ -1,6 +1,8 @@
|
||||
coverage
|
||||
node_modules
|
||||
**/coverage/**
|
||||
**/node_modules/**
|
||||
examples/javascript-wd
|
||||
packages/*/build/**/*
|
||||
**/build/**
|
||||
**/*.min.js
|
||||
sample-code
|
||||
**/*.d.ts
|
||||
**/build-fixtures/**
|
||||
|
||||
@@ -9,6 +9,35 @@
|
||||
{
|
||||
"files": "packages/*/test/**/*",
|
||||
"rules": { "func-names": "off" }
|
||||
},
|
||||
{
|
||||
"files": "./packages/*/scripts/**/*.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`"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
+28
-52
@@ -1,64 +1,40 @@
|
||||
# Generated by FOSSA CLI (https://github.com/fossas/fossa-cli)
|
||||
# Visit https://fossa.com to learn more
|
||||
|
||||
version: 2
|
||||
cli:
|
||||
server: https://app.fossa.com
|
||||
fetcher: git
|
||||
project: github.com/appium/appium
|
||||
analyze:
|
||||
modules:
|
||||
- name: appium-monorepo
|
||||
type: npm
|
||||
target: .
|
||||
version: 3
|
||||
|
||||
project:
|
||||
id: github.com/appium/appium
|
||||
name: appium
|
||||
|
||||
paths:
|
||||
exclude:
|
||||
- ./sample-code
|
||||
- '**/fixtures/**'
|
||||
- '**/demo/**'
|
||||
- '**/example/**'
|
||||
- '**/examples/**'
|
||||
|
||||
targets:
|
||||
only:
|
||||
- type: npm
|
||||
path: .
|
||||
options:
|
||||
strategy: node_modules
|
||||
- name: appium
|
||||
type: npm
|
||||
target: ./packages/appium
|
||||
- type: npm
|
||||
path: ./packages/appium
|
||||
options:
|
||||
strategy: node_modules
|
||||
- name: '@appium/base-driver'
|
||||
type: npm
|
||||
target: ./packages/base-driver
|
||||
- type: npm
|
||||
path: ./packages/base-driver
|
||||
options:
|
||||
strategy: node_modules
|
||||
- name: '@appium/doctor'
|
||||
type: npm
|
||||
target: ./packages/doctor
|
||||
- type: npm
|
||||
path: ./packages/doctor
|
||||
options:
|
||||
strategy: node_modules
|
||||
- name: eslint-config-appium
|
||||
type: npm
|
||||
target: ./packages/eslint-config-appium
|
||||
- type: npm
|
||||
path: ./packages/eslint-config-appium
|
||||
options:
|
||||
strategy: node_modules
|
||||
- name: '@appium/fake-driver'
|
||||
type: npm
|
||||
target: ./packages/fake-driver
|
||||
- type: npm
|
||||
path: ./packages/fake-driver
|
||||
options:
|
||||
strategy: node_modules
|
||||
- name: '@appium/gulp-plugins'
|
||||
type: npm
|
||||
target: ./packages/gulp-plugins
|
||||
- type: npm
|
||||
path: ./packages/gulp-plugins
|
||||
options:
|
||||
strategy: node_modules
|
||||
- name: '@appium/support'
|
||||
type: npm
|
||||
target: ./packages/support
|
||||
- type: npm
|
||||
path: ./packages/support
|
||||
options:
|
||||
strategy: node_modules
|
||||
- name: '@appium/test-support'
|
||||
type: npm
|
||||
target: ./packages/test-support
|
||||
- type: npm
|
||||
path: ./packages/test-support
|
||||
options:
|
||||
strategy: node_modules
|
||||
|
||||
revision:
|
||||
branch: 2.0
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
# 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: Node.js CI
|
||||
name: Appium Build
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
test:
|
||||
name: Test
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [12.x, 14.x, 16.x]
|
||||
@@ -23,30 +23,29 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
- name: Run unit tests
|
||||
run: npm test
|
||||
run: npm run test:ci
|
||||
- name: Install @appium/fake-driver
|
||||
run: npm run install-fake-driver
|
||||
- name: Run E2E tests
|
||||
run: |
|
||||
npm run install-fake-driver
|
||||
npm run e2e-test
|
||||
run: npm run e2e-test
|
||||
|
||||
fossa-scan:
|
||||
lint:
|
||||
name: Lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Analyze with FOSSA
|
||||
run: |
|
||||
npm install
|
||||
curl https://raw.githubusercontent.com/fossas/fossa-cli/master/install.sh | sudo bash
|
||||
fossa analyze
|
||||
env:
|
||||
FOSSA_API_KEY: ${{secrets.FOSSA_API_KEY}}
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
- name: ESLint
|
||||
run: npm run lint
|
||||
|
||||
generate_docs:
|
||||
needs: [build]
|
||||
docs:
|
||||
name: Build Command Documentation
|
||||
needs: [test]
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: |
|
||||
npm install
|
||||
npm run generate-docs
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
- name: Generate docs
|
||||
run: npm run generate-docs
|
||||
@@ -0,0 +1,21 @@
|
||||
name: License Checks
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
jobs:
|
||||
fossa-check:
|
||||
name: Run FOSSA Analysis
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
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}}
|
||||
@@ -56,3 +56,5 @@ appium.zip
|
||||
.vscode/settings.json
|
||||
.nyc_output
|
||||
*.lerna_backup
|
||||
**/build-fixtures/**
|
||||
|
||||
|
||||
+6
-1
@@ -3,5 +3,10 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
require: require.resolve('./test/setup.js')
|
||||
require: [
|
||||
require.resolve('./test/setup.js')
|
||||
],
|
||||
// forbids use of .only() in CI
|
||||
forbidOnly: Boolean(process.env.CI),
|
||||
color: true
|
||||
};
|
||||
|
||||
Vendored
+6
-33
@@ -6,45 +6,18 @@
|
||||
"internalConsoleOptions": "openOnSessionStart",
|
||||
"name": "Test - Current File",
|
||||
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
|
||||
"runtimeArgs": ["-r", "@babel/register"],
|
||||
"runtimeArgs": ["--require", "@babel/register"],
|
||||
"request": "launch",
|
||||
"skipFiles": ["<node_internals>/**"],
|
||||
"skipFiles": ["<node_internals>/**", "**/node_modules/mocha/**"],
|
||||
"type": "pwa-node",
|
||||
"sourceMaps": true,
|
||||
"cwd": "${workspaceFolder}",
|
||||
"outfiles": [],
|
||||
"env": {
|
||||
"NODE_ENV": "test"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Debug",
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"cwd": "${workspaceFolder}",
|
||||
"console": "integratedTerminal",
|
||||
"args": ["."]
|
||||
},
|
||||
{
|
||||
"name": "Attach Debug",
|
||||
"type": "node",
|
||||
"request": "attach",
|
||||
"cwd": "${workspaceFolder}",
|
||||
"port": 9229
|
||||
},
|
||||
{
|
||||
"name": "Test All",
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/node_modules/.bin/_mocha",
|
||||
"args": [
|
||||
"--require",
|
||||
"@babel/register",
|
||||
"--timeout",
|
||||
"999999",
|
||||
"--colors",
|
||||
"${workspaceFolder}/packages/appium/test"
|
||||
]
|
||||
"NODE_ENV": "test",
|
||||
"BABEL_ENV": "test"
|
||||
},
|
||||
"autoAttachChildProcesses": true,
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Vendored
+7
-21
@@ -3,14 +3,15 @@
|
||||
"tasks": [
|
||||
{
|
||||
"type": "npm",
|
||||
"script": "build",
|
||||
"script": "dev",
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"problemMatcher": [],
|
||||
"label": "npm: build",
|
||||
"detail": "lerna exec gulp transpile"
|
||||
"label": "npm: dev",
|
||||
"detail": "lerna exec --parallel gulp dev",
|
||||
"isBackground": true,
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
@@ -124,27 +125,12 @@
|
||||
"label": "transpile: @appium/base-driver",
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"command": "node_modules/.bin/mocha",
|
||||
"args": [
|
||||
"--bail",
|
||||
"-r",
|
||||
"@babel/register",
|
||||
"-t",
|
||||
"20s",
|
||||
"packages/appium/test/*e2e-specs.js"
|
||||
],
|
||||
"label": "appium: E2E",
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"type": "npm",
|
||||
"script": "dev",
|
||||
"script": "test:e2e:appium",
|
||||
"problemMatcher": [],
|
||||
"isBackground": true,
|
||||
"label": "npm: dev",
|
||||
"detail": "lerna exec --parallel gulp dev"
|
||||
"label": "npm: test:e2e:appium",
|
||||
"detail": "e2e tests: appium"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
+10
-2
@@ -14,17 +14,22 @@ module.exports = (wallaby) => {
|
||||
'./packages/**/*.json',
|
||||
'!./packages/**/build/**',
|
||||
'!./packages/**/test/**/*-specs.js',
|
||||
'!./packages/**/test/**/*.spec.js',
|
||||
'!./packages/*/node_modules/**',
|
||||
'!./packages/*/gulpfile.js',
|
||||
'!./packages/*/scripts/**',
|
||||
'./packages/*/test/**/fixtures/**/*',
|
||||
'./packages/*/test/**/mocks.js',
|
||||
'./packages/*/test/helpers.js',
|
||||
'./babel.config.json',
|
||||
// below this are fixtures
|
||||
{
|
||||
binary: true,
|
||||
pattern: './packages/support/test/assets/sample_binary.plist',
|
||||
pattern: './packages/support/test/unit/assets/sample_binary.plist',
|
||||
},
|
||||
{
|
||||
instrument: false,
|
||||
pattern: './packages/support/test/assets/sample_text.plist',
|
||||
pattern: './packages/support/test/unit/assets/sample_text.plist',
|
||||
},
|
||||
{
|
||||
instrument: false,
|
||||
@@ -34,6 +39,7 @@ module.exports = (wallaby) => {
|
||||
instrument: false,
|
||||
pattern: './packages/gulp-plugins/build/**/*',
|
||||
},
|
||||
// this setup file is special
|
||||
{
|
||||
instrument: false,
|
||||
pattern: './test/setup.js'
|
||||
@@ -42,7 +48,9 @@ module.exports = (wallaby) => {
|
||||
testFramework: 'mocha',
|
||||
tests: [
|
||||
'./packages/*/test/**/*-specs.js',
|
||||
'./packages/*/test/unit/**/*.spec.js',
|
||||
'!./packages/*/test/**/*-e2e-specs.js',
|
||||
'!./packages/*/test/e2e/**/*',
|
||||
'!./packages/*/node_modules/**',
|
||||
// this is more of an E2E test and it's tedious to run
|
||||
'!./packages/gulp-plugins/test/transpile-specs.js',
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
## Appium
|
||||
|
||||
[](https://npmjs.org/package/appium)
|
||||
[](https://david-dm.org/appium/appium)
|
||||
[](https://david-dm.org/appium/appium#info=devDependencies)
|
||||
[](https://github.com/appium/appium/actions/workflows/node.js.yml)
|
||||
|
||||
[](https://npmjs.org/package/appium)
|
||||
|
||||
|
||||
+7
-2
@@ -6,6 +6,11 @@ Formatted doc is [here](http://appium.io/documentation.html?lang=en).
|
||||
|
||||
## doc translation
|
||||
|
||||
At the moment we are focusing on improving the english documentation. When it
|
||||
is done we are planning to setup proper i18n l10n processes so that it is
|
||||
At the moment we are focusing on improving the English documentation. When it
|
||||
is done, we are planning to establish proper i18n and l10n processes so that it is
|
||||
easier for people to help in translating the documentation.
|
||||
|
||||
## Bump supported NodeJS version
|
||||
|
||||
- Refer to the [Node.js Release Working Group README](https://github.com/nodejs/release#readme) to check LTS, maintenance, and EOL Node.js versions
|
||||
- Example to bump supported NodeJS version: appium/appium#15000
|
||||
|
||||
@@ -11,13 +11,16 @@ Appium 服务端自身定义了基于官方协议的扩展,帮助 Appium 用
|
||||
Ruby | [https://github.com/appium/ruby_lib](https://github.com/appium/ruby_lib), [https://github.com/appium/ruby_lib_core](https://github.com/appium/ruby_lib_core)
|
||||
Python | [https://github.com/appium/python-client](https://github.com/appium/python-client)
|
||||
Java | [https://github.com/appium/java-client](https://github.com/appium/java-client)
|
||||
C# (.NET) | [https://github.com/appium/appium-dotnet-driver](https://github.com/appium/appium-dotnet-driver)
|
||||
|
||||
### Community based
|
||||
|
||||
语言 / 框架 | Github 仓库和安装指南 |
|
||||
----- | ----- |
|
||||
JavaScript (Node.js) | [https://github.com/admc/wd](https://github.com/admc/wd)
|
||||
JavaScript (Node.js) | [https://github.com/webdriverio/webdriverio](https://github.com/webdriverio/webdriverio)
|
||||
JavaScript (Browser) | [https://github.com/projectxyzio/web2driver](https://github.com/projectxyzio/web2driver)
|
||||
Objective C | [https://github.com/appium/selenium-objective-c](https://github.com/appium/selenium-objective-c)
|
||||
PHP | [https://github.com/appium/php-client](https://github.com/appium/php-client)
|
||||
C# (.NET) | [https://github.com/appium/appium-dotnet-driver](https://github.com/appium/appium-dotnet-driver)
|
||||
RobotFramework | [https://github.com/jollychang/robotframework-appiumlibrary](https://github.com/jollychang/robotframework-appiumlibrary)
|
||||
RobotFramework | [https://github.com/serhatbolsu/robotframework-appiumlibrary](https://github.com/serhatbolsu/robotframework-appiumlibrary)
|
||||
|
||||
---
|
||||
EOF.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## Appium 介绍
|
||||
|
||||
Appium 是一个开源工具,用于自动化 iOS 手机、 Android 手机和 Windows 桌面平台上的原生、移动 Web 和混合应用。**「原生应用」**指那些用 iOS、 Android 或者 Windows SDKs 编写的应用。**「移动 Web 应用」**是用移动端浏览器访问的应用( Appium 支持 iOS 上的 Safari 、Chrome 和 Android 上的内置浏览器)。**「混合应用」**带有一个「webview」的包装器——用来和 Web 内容交互的原生控件。类似于 [Apache Cordova](https://cordova.apache.org) 或 [Phonegap](http://phonegap.com/) 项目,创建一个混合应用使得用 Web 技术开发然后打包进原生包装器创建一个混合应用变得容易了。
|
||||
Appium 是一个开源工具,用于自动化 iOS 手机、 Android 手机和 Windows 桌面平台上的原生、移动 Web 和混合应用。**「原生应用」**指那些用 iOS、 Android 或者 Windows SDKs 编写的应用。**「移动 Web 应用」**是用移动端浏览器访问的应用( Appium 支持 iOS 上的 Safari 、Chrome 和 Android 上的内置浏览器)。**「混合应用」**带有一个「webview」的包装器——用来和 Web 内容交互的原生控件。类似于 [Apache Cordova](https://cordova.apache.org) 项目,创建一个混合应用使得用 Web 技术开发然后打包进原生包装器创建一个混合应用变得容易了。
|
||||
|
||||
重要的是,Appium 是跨平台的:它允许你用同样的 API 对多平台(iOS、Android、Windows)写测试。做到在 iOS、Android 和 Windows 测试套件之间复用代码。
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ Appium 给用户提供了在一个机器上启动多个 Android sessions 的方
|
||||
|
||||
十分不幸,目前并不能在本地运行 iOS 的并发测试。iOS 同一时间只能启动一个模拟器,不像 Andoid 可以同时多个模拟器去运行测试。
|
||||
|
||||
如果你想运行 iOS 的并发测试,你需要使用 Sauce 上传你的 Appium 测试脚本,然后就可以运行多台 iOS 和 Android 的并发测试,只要你的账号允许。查看更多相关信息可以查看 [这里](https://docs.saucelabs.com/tutorials/appium/)。
|
||||
如果你想运行 iOS 的并发测试,你需要使用 Sauce 上传你的 Appium 测试脚本,然后就可以运行多台 iOS 和 Android 的并发测试,只要你的账号允许。
|
||||
|
||||
|
||||
本文由 thanksdanny 翻译,由 lihuazhang 校验。
|
||||
|
||||
@@ -8,17 +8,13 @@ Appium 支持以下语言的客户端类库:
|
||||
| [Python][pypi] | [GitHub](https://github.com/appium/python-client) |
|
||||
| [Java][maven] | [GitHub](https://github.com/appium/java-client) |
|
||||
| [JavaScript][npm] | [GitHub](https://github.com/admc/wd) |
|
||||
| [PHP][php] | [GitHub](https://github.com/appium/php-client) |
|
||||
| [C#][nuget] | [GitHub](https://github.com/appium/appium-dotnet-driver) |
|
||||
| [Objective-C][cocoapods] | [GitHub](https://github.com/appium/selenium-objective-c) |
|
||||
|
||||
[rubygems]: http://rubygems.org/gems/appium_lib
|
||||
[pypi]: https://pypi.python.org/pypi/Appium-Python-Client
|
||||
[maven]: https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22io.appium%22%20AND%20a%3A%22java-client%22
|
||||
[npm]: https://www.npmjs.org/package/wd
|
||||
[php]: https://github.com/appium/php-client
|
||||
[nuget]: https://www.nuget.org/packages/Appium.WebDriver/
|
||||
[cocoapods]: https://github.com/appium/selenium-objective-c
|
||||
|
||||
|
||||
注意,一些方法类似 `endTestCoverage()` 目前并不能完全支持。当[这个问题](https://github.com/appium/appium/issues/2448)被解决后,覆盖率支持才会被添加。如果你仍然想使用这些方法,请参考 GitHub 上关于 bindings 的文档。
|
||||
@@ -47,21 +43,11 @@ driver.lockScreen(3);
|
||||
driver.lock(3)
|
||||
```
|
||||
|
||||
```php
|
||||
// php
|
||||
$this->lock(3);
|
||||
```
|
||||
|
||||
```csharp
|
||||
// c#
|
||||
driver.LockDevice(3);
|
||||
```
|
||||
|
||||
```objectivec
|
||||
// objective c
|
||||
[driver lockDeviceScreen:3];
|
||||
```
|
||||
|
||||
### 将应用切换至后台
|
||||
|
||||
将当前的应用切换到后台,然后可以让其在指定时间内回到前台,或者让它一直留在后台。
|
||||
@@ -97,24 +83,12 @@ driver.backgroundApp(-1); // 持续置于后台
|
||||
driver.backgroundApp({timeout: null}); // 持续置于后台
|
||||
```
|
||||
|
||||
```php
|
||||
// php
|
||||
$this->backgroundApp(5);
|
||||
$this->backgroundApp(-1);
|
||||
```
|
||||
|
||||
```csharp
|
||||
// c#
|
||||
driver.BackgroundApp(5);
|
||||
driver.BackgroundApp(-1);
|
||||
```
|
||||
|
||||
```objectivec
|
||||
// objective c
|
||||
[driver runAppInBackground:3];
|
||||
[driver runAppInBackground:-1];
|
||||
```
|
||||
|
||||
### 收起键盘
|
||||
|
||||
收起键盘。
|
||||
@@ -141,23 +115,11 @@ driver.hideKeyboard();
|
||||
driver.hideKeyboard()
|
||||
```
|
||||
|
||||
```php
|
||||
// php
|
||||
$this->hideKeyboard();
|
||||
$this->hideKeyboard(array('strategy' => 'pressKey', 'key' => 'Done'));
|
||||
```
|
||||
|
||||
```csharp
|
||||
// c#
|
||||
driver.HideKeyboard("Done");
|
||||
```
|
||||
|
||||
```objectivec
|
||||
// objective c
|
||||
[driver hideKeyboard];
|
||||
```
|
||||
|
||||
|
||||
### 启动 Activity
|
||||
|
||||
在当前 app 打开一个 activity,或者新打开一个应用并启动一个 acticity, *仅支持 Android*。
|
||||
@@ -187,18 +149,6 @@ start_activity app_package: 'io.appium.android.apis', app_activity: '.accessibil
|
||||
driver.StartActivity("com.example.android.apis", ".Foo");
|
||||
```
|
||||
|
||||
```php
|
||||
// php
|
||||
$this->startActivity(array("appPackage" => "com.example.android.apis",
|
||||
"appActivity" => ".Foo"));
|
||||
```
|
||||
|
||||
```objectivec
|
||||
// objective c
|
||||
[driver startActivity:@"com.example.android.apis" package:@".Foo"];
|
||||
```
|
||||
|
||||
|
||||
### 打开通知栏
|
||||
|
||||
打开通知栏,*仅支持 Android*。
|
||||
@@ -228,16 +178,6 @@ open_notifications
|
||||
driver.OpenNotifications();
|
||||
```
|
||||
|
||||
```php
|
||||
// php
|
||||
$this->openNotifications();
|
||||
```
|
||||
|
||||
```objectivec
|
||||
// objective c
|
||||
[driver openNotifications];
|
||||
```
|
||||
|
||||
### 应用是否已安装
|
||||
|
||||
检测应用是否已被安装。
|
||||
@@ -263,21 +203,11 @@ driver.isAppInstalled("com.example.android.apis")
|
||||
.then(function (isAppInstalled) { /*...*/ })
|
||||
```
|
||||
|
||||
```php
|
||||
// php
|
||||
$this->isAppInstalled('com.example.android.apis');
|
||||
```
|
||||
|
||||
```csharp
|
||||
// c#
|
||||
driver.IsAppInstalled("com.example.android.apis-");
|
||||
```
|
||||
|
||||
```objectivec
|
||||
// objective c
|
||||
[driver isAppInstalled:@"com.example.android.apis-"];
|
||||
```
|
||||
|
||||
### 安装应用
|
||||
|
||||
在设备上安装应用。
|
||||
@@ -302,21 +232,11 @@ driver.installApp("path/to/my.apk")
|
||||
driver.installApp("path/to/my.apk")
|
||||
```
|
||||
|
||||
```php
|
||||
// php
|
||||
$this->installApp('path/to/my.apk');
|
||||
```
|
||||
|
||||
```csharp
|
||||
// c#
|
||||
driver.InstallApp("path/to/my.apk");
|
||||
```
|
||||
|
||||
```objectivec
|
||||
// objective c
|
||||
[driver installAppAtPath:@"path/to/my.apk"];
|
||||
```
|
||||
|
||||
|
||||
### 卸载应用
|
||||
|
||||
@@ -342,21 +262,11 @@ driver.removeApp("com.example.android.apis")
|
||||
driver.removeApp("com.example.android.apis")
|
||||
```
|
||||
|
||||
```php
|
||||
// php
|
||||
$this->removeApp('com.example.android.apis');
|
||||
```
|
||||
|
||||
```csharp
|
||||
// c#
|
||||
driver.RemoveApp("com.example.android.apis");
|
||||
```
|
||||
|
||||
```objectivec
|
||||
// objective c
|
||||
[driver removeApp:@"com.example.android.apis"];
|
||||
```
|
||||
|
||||
### 摇一摇
|
||||
|
||||
模拟摇晃设备的操作。
|
||||
@@ -381,21 +291,11 @@ driver.shake()
|
||||
driver.shake()
|
||||
```
|
||||
|
||||
```php
|
||||
// php
|
||||
$this->shake();
|
||||
```
|
||||
|
||||
```csharp
|
||||
// c#
|
||||
driver.ShakeDevice();
|
||||
```
|
||||
|
||||
```objectivec
|
||||
// objective c
|
||||
[driver shakeDevice];
|
||||
```
|
||||
|
||||
### 关闭应用
|
||||
|
||||
关闭应用。
|
||||
@@ -420,21 +320,11 @@ driver.closeApp()
|
||||
driver.closeApp()
|
||||
```
|
||||
|
||||
```php
|
||||
// php
|
||||
$this->closeApp();
|
||||
```
|
||||
|
||||
```csharp
|
||||
// c#
|
||||
driver.CloseApp();
|
||||
```
|
||||
|
||||
```objectivec
|
||||
// objective c
|
||||
[driver closeApp];
|
||||
```
|
||||
|
||||
### 启动(Launch)
|
||||
|
||||
为 desired capabilities 启动一个 session。请注意只有设置了 autoLaunch=false 关键字时才会生效。这不是为了随意启动一个应用或 activities ——如果你想这么做,请使用 `start_activity` 这个 desired capability 的参数。这个方法的使用场景是在你设置了 autoLaunch=false 后,用来继续执行初始化("launch")流程的。(译者注:举个例子,国产系统经常会在应用安装时弹出提示窗阻碍安装,此时可以通过 autoLaunch=false 来让应用安装后先执行你的脚本来关掉弹窗,然后再用这个函数来继续启动应用。)
|
||||
@@ -459,21 +349,11 @@ driver.launchApp()
|
||||
driver.launchApp()
|
||||
```
|
||||
|
||||
```php
|
||||
// php
|
||||
$this->launchApp();
|
||||
```
|
||||
|
||||
```csharp
|
||||
// c#
|
||||
driver.LaunchApp();
|
||||
```
|
||||
|
||||
```objectivec
|
||||
// objective c
|
||||
[driver launchApp];
|
||||
```
|
||||
|
||||
### 重置
|
||||
|
||||
重置应用。(译者注:类似于清除缓存)
|
||||
@@ -498,21 +378,11 @@ driver.resetApp()
|
||||
driver.resetApp()
|
||||
```
|
||||
|
||||
```php
|
||||
// php
|
||||
$this->reset();
|
||||
```
|
||||
|
||||
```csharp
|
||||
// c#
|
||||
driver.ResetApp();
|
||||
```
|
||||
|
||||
```objectivec
|
||||
// objective c
|
||||
[driver resetApp];
|
||||
```
|
||||
|
||||
### 可用的上下文(Contexts)
|
||||
|
||||
列出所有可用的上下文(contexts)。
|
||||
@@ -537,21 +407,11 @@ driver.getContextHandles()
|
||||
driver.contexts().then(function (contexts) { /*...*/ })
|
||||
```
|
||||
|
||||
```php
|
||||
// php
|
||||
$this->contexts();
|
||||
```
|
||||
|
||||
```csharp
|
||||
// c#
|
||||
driver.GetContexts()
|
||||
```
|
||||
|
||||
```objectivec
|
||||
// objective c
|
||||
NSArray *contexts = driver.allContexts;
|
||||
```
|
||||
|
||||
### 当前上下文(context)
|
||||
|
||||
列出当前的上下文(context)。
|
||||
@@ -576,21 +436,11 @@ driver.getContext()
|
||||
driver.currentContext().then(function (context) { /*...*/ })
|
||||
```
|
||||
|
||||
```php
|
||||
// php
|
||||
$this->context();
|
||||
```
|
||||
|
||||
```csharp
|
||||
// c#
|
||||
driver.GetContext()
|
||||
```
|
||||
|
||||
```objectivec
|
||||
// objective c
|
||||
NSString *context = driver.context;
|
||||
```
|
||||
|
||||
### 切换至默认的上下文(context)
|
||||
|
||||
切换回默认的上下文(context)。(译者注:一般就是原生上下文 “NATIVE_APP”)
|
||||
@@ -615,21 +465,11 @@ driver.context();
|
||||
driver.context()
|
||||
```
|
||||
|
||||
```php
|
||||
// php
|
||||
$this->context(NULL);
|
||||
```
|
||||
|
||||
```csharp
|
||||
// c#
|
||||
driver.SetContext();
|
||||
```
|
||||
|
||||
```objectivec
|
||||
// objective c
|
||||
[driver setContext:nil];
|
||||
```
|
||||
|
||||
### 应用的字符串
|
||||
|
||||
获得应用的字符串。(译者注:这里实际指的是返回应用的多语言文本,即每个 string 变量及在指定语言上的显示内容。例如 `{"action_forgot_password":"Forgot your password?"}` 。在 android 上对应的是项目中的 `strings.xml` 多语言配置文件)
|
||||
@@ -654,23 +494,11 @@ driver.getAppStrings();
|
||||
driver.getAppStrings().then(function (appStrings) { /*...*/ })
|
||||
```
|
||||
|
||||
```php
|
||||
// php
|
||||
$this->appStrings();
|
||||
$this->appStrings('ru');
|
||||
```
|
||||
|
||||
```csharp
|
||||
// c#
|
||||
driver.GetAppStrings();
|
||||
```
|
||||
|
||||
```objectivec
|
||||
// objective c
|
||||
[driver appStrings];
|
||||
[driver appStringsForLanguage:"@ru"];
|
||||
```
|
||||
|
||||
### 按键事件
|
||||
|
||||
给设备发送按键事件。
|
||||
@@ -695,22 +523,11 @@ driver.sendKeyEvent(AndroidKeyCode.HOME);
|
||||
driver.deviceKeyEvent(wd.SPECIAL_KEYS.Home)
|
||||
```
|
||||
|
||||
```php
|
||||
// php
|
||||
$this->keyEvent('176');
|
||||
```
|
||||
|
||||
```csharp
|
||||
// c#
|
||||
driver.KeyEvent("176");
|
||||
```
|
||||
|
||||
```objectivec
|
||||
// objective c
|
||||
NSError *err;
|
||||
[driver triggerKeyEvent:176 metastate:0 error:&err];
|
||||
```
|
||||
|
||||
### 当前 Activity
|
||||
|
||||
获取当前的 Acticity。仅支持 Android。
|
||||
@@ -735,22 +552,11 @@ driver.currentActivity();
|
||||
driver.getCurrentActivity().then(function (activity) { /*...*/ })
|
||||
```
|
||||
|
||||
```php
|
||||
// php
|
||||
$this->currentActivity();
|
||||
```
|
||||
|
||||
```csharp
|
||||
// c#
|
||||
driver.GetCurrentActivity();
|
||||
```
|
||||
|
||||
```objectivec
|
||||
// objective c
|
||||
NSError *err;
|
||||
[driver currentActivity];
|
||||
```
|
||||
|
||||
### 当前包名(package)
|
||||
|
||||
获取当前包名(package)。仅支持 Android 。
|
||||
@@ -775,17 +581,11 @@ driver.getCurrentPackage();
|
||||
driver.getCurrentPackage().then(function (package) { /*...*/ })
|
||||
```
|
||||
|
||||
```php
|
||||
// php
|
||||
$this->currentPackage();
|
||||
```
|
||||
|
||||
```csharp
|
||||
// c#
|
||||
driver.GetCurrentPackage();
|
||||
```
|
||||
|
||||
|
||||
### 点击操作 / 多点触控操作
|
||||
|
||||
用于生成点击操作的 API。这部分文档的内容将会很快被补充进来。
|
||||
@@ -821,33 +621,6 @@ action
|
||||
return action.perform(); // returns a promise
|
||||
```
|
||||
|
||||
```php
|
||||
// php
|
||||
$action = $this->initiateTouchAction();
|
||||
->press(array('element' => $el))
|
||||
->release()
|
||||
->perform();
|
||||
|
||||
$action1 = $this->initiateTouchAction();
|
||||
$action1->press(array('element' => $els[0]))
|
||||
->moveTo(array('x' => 10, 'y' => 0))
|
||||
->moveTo(array('x' => 10, 'y' => -75))
|
||||
->moveTo(array('x' => 10, 'y' => -600))
|
||||
->release();
|
||||
|
||||
$action2 = $this->initiateTouchAction();
|
||||
$action2->press(array('element' => $els[1]))
|
||||
->moveTo(array('x' => 10, 'y' => 10))
|
||||
->moveTo(array('x' => 10, 'y' => -300))
|
||||
->moveTo(array('x' => 10, 'y' => -600))
|
||||
->release();
|
||||
|
||||
$multiAction = $this->initiateMultiAction();
|
||||
$multiAction->add($action1);
|
||||
$multiAction->add($action2);
|
||||
$multiAction->perform();
|
||||
```
|
||||
|
||||
```csharp
|
||||
// c#
|
||||
ITouchAction action = new TouchAction(driver);
|
||||
@@ -891,11 +664,6 @@ return driver.swipe({ startX: 75, startY: 500,
|
||||
endX: 75, endY: 0, duration: 800 });
|
||||
```
|
||||
|
||||
```php
|
||||
// php
|
||||
$this->swipe(75, 500, 75, 0, 800);
|
||||
```
|
||||
|
||||
```csharp
|
||||
// c#
|
||||
todo: c#
|
||||
@@ -952,10 +720,6 @@ return driver.pinch(el);
|
||||
return el.pinch();
|
||||
```
|
||||
|
||||
```php
|
||||
$this->pinch($el);
|
||||
```
|
||||
|
||||
```csharp
|
||||
// c#
|
||||
driver.Pinch(25, 25)
|
||||
@@ -1012,11 +776,6 @@ return driver.zoom(el);
|
||||
return el.zoom();
|
||||
```
|
||||
|
||||
```php
|
||||
// php
|
||||
$this->zoom($el);
|
||||
```
|
||||
|
||||
```csharp
|
||||
// c#
|
||||
driver.Zoom(100, 200);
|
||||
@@ -1054,12 +813,6 @@ return driver.elementByAccessibilityId().then(function (el) {
|
||||
});
|
||||
```
|
||||
|
||||
```php
|
||||
// php
|
||||
$els = $this->elements($this->using('class name')->value('android.widget.TextView'));
|
||||
$this->scroll($els[count($els) - 1], $els[0]);
|
||||
```
|
||||
|
||||
```csharp
|
||||
// c#
|
||||
Dictionary<string, string> scrollObject = new Dictionary<string, string>();
|
||||
@@ -1093,11 +846,6 @@ driver.pullFile("Library/AddressBook/AddressBook.sqlitedb")
|
||||
.then(function (base64File) { /*...*/ })
|
||||
```
|
||||
|
||||
```php
|
||||
// php
|
||||
$this->pullFile('Library/AddressBook/AddressBook.sqlitedb');
|
||||
```
|
||||
|
||||
```csharp
|
||||
// c#
|
||||
driver.PullFile("Library/AddressBook/AddressBook.sqlitedb");
|
||||
@@ -1133,13 +881,6 @@ driver.pushFile(path, data)
|
||||
driver.pushFile(path, data)
|
||||
```
|
||||
|
||||
```php
|
||||
// php
|
||||
$path = 'data/local/tmp/test_push_file.txt';
|
||||
$data = 'This is the contents of the file to push to the device.';
|
||||
$this->pushFile($path, base64_encode($data));
|
||||
```
|
||||
|
||||
```csharp
|
||||
// c#
|
||||
driver.PushFile("/data/local/tmp/file.txt", "some data for the file");
|
||||
@@ -1175,12 +916,6 @@ var settings = driver.settings();
|
||||
browser.updateSettings({'someSetting': true});
|
||||
```
|
||||
|
||||
```php
|
||||
// php
|
||||
$settings = $this->getSettings();
|
||||
$this->updateSettings(array('cyberdelia' => "open"));
|
||||
```
|
||||
|
||||
```csharp
|
||||
// c#
|
||||
Dictionary<String, Object>settings = driver.GetSettings();
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
想知道当前要做什么,最好的方法就是是查看示例代码:
|
||||
|
||||
[Node.js](https://github.com/appium/appium/tree/master/sample-code/javascript-webdriverio) | [Python](https://github.com/appium/appium/tree/master/sample-code/python) | [PHP](https://github.com/appium/appium/tree/master/sample-code/php) | [Ruby](https://github.com/appium/appium/tree/master/sample-code/ruby) | [Java](https://github.com/appium/appium/tree/master/sample-code/java)
|
||||
[Node.js](https://github.com/appium/appium/tree/master/sample-code/javascript-webdriverio) | [Python](https://github.com/appium/appium/tree/master/sample-code/python) | [Ruby](https://github.com/appium/appium/tree/master/sample-code/ruby) | [Java](https://github.com/appium/appium/tree/master/sample-code/java)
|
||||
|
||||
基本上,首先确认 Appium 正在运行:
|
||||
|
||||
@@ -50,20 +50,6 @@
|
||||
}
|
||||
```
|
||||
|
||||
```php
|
||||
// php
|
||||
public static $browsers = array(
|
||||
array(
|
||||
'desiredCapabilities' => array(
|
||||
'platformName' => 'iOS',
|
||||
'platformVersion' => '7.1',
|
||||
'deviceName' => 'iPhone Simulator',
|
||||
'app' => $myApp
|
||||
)
|
||||
)
|
||||
);
|
||||
```
|
||||
|
||||
```java
|
||||
// java
|
||||
DesiredCapabilities capabilities = new DesiredCapabilities();
|
||||
@@ -142,20 +128,6 @@ Activity 可以通过以下方式指定:
|
||||
}
|
||||
```
|
||||
|
||||
```php
|
||||
// php
|
||||
public static $browsers = array(
|
||||
array(
|
||||
'desiredCapabilities' => array(
|
||||
'platformName' => 'Android',
|
||||
'platformVersion' => '4.4',
|
||||
'deviceName' => 'Android Emulator',
|
||||
'app' => $myApp
|
||||
)
|
||||
)
|
||||
);
|
||||
```
|
||||
|
||||
```java
|
||||
// java
|
||||
DesiredCapabilities capabilities = new DesiredCapabilities();
|
||||
@@ -205,23 +177,6 @@ Android 设备在 4.3 版本(API 级别 17)之前没有安装谷歌的 [UiA
|
||||
}
|
||||
```
|
||||
|
||||
```php
|
||||
// php
|
||||
public static $browsers = array(
|
||||
array(
|
||||
'desiredCapabilities' => array(
|
||||
'automationName' => 'Selendroid',
|
||||
'platformName' => 'Android',
|
||||
'platformVersion' => '2.3',
|
||||
'deviceName' => 'Android Emulator',
|
||||
'app' => $myApp,
|
||||
'appPackage' => 'com.mycompany.package',
|
||||
'appActivity'=> '.MainActivity'
|
||||
)
|
||||
)
|
||||
);
|
||||
```
|
||||
|
||||
```java
|
||||
// java
|
||||
DesiredCapabilities capabilities = new DesiredCapabilities();
|
||||
|
||||
@@ -6,15 +6,22 @@ Appium client libraries implement the [Mobile JSON Wire Protocol](https://github
|
||||
|
||||
The Appium server itself defines custom extensions to the official protocols, giving Appium users helpful access to various device behaviors (such as installing/uninstalling apps during the course of a test session). This is why we need Appium-specific clients, not just the 'vanilla' Selenium clients. Of course, Appium client libraries only **add** functionality (in fact, they simply extend the standard Selenium clients), so they can still be used to run regular Selenium sessions.
|
||||
|
||||
### Appium repository
|
||||
|
||||
Language/Framework | Github Repo and Installation Instructions |
|
||||
----- | ----- |
|
||||
Ruby | [https://github.com/appium/ruby_lib](https://github.com/appium/ruby_lib), [https://github.com/appium/ruby_lib_core](https://github.com/appium/ruby_lib_core)
|
||||
Python | [https://github.com/appium/python-client](https://github.com/appium/python-client)
|
||||
Java | [https://github.com/appium/java-client](https://github.com/appium/java-client)
|
||||
JavaScript (Node.js) | [https://github.com/admc/wd](https://github.com/admc/wd)
|
||||
C# (.NET) | [https://github.com/appium/appium-dotnet-driver](https://github.com/appium/appium-dotnet-driver)
|
||||
|
||||
### Community based
|
||||
|
||||
Language/Framework | Github Repo and Installation Instructions |
|
||||
----- | ----- |
|
||||
[Deprecated] JavaScript (Node.js) | [https://github.com/admc/wd](https://github.com/admc/wd)
|
||||
JavaScript (Node.js) | [https://github.com/webdriverio/webdriverio](https://github.com/webdriverio/webdriverio)
|
||||
JavaScript (Browser) | [https://github.com/projectxyzio/web2driver](https://github.com/projectxyzio/web2driver)
|
||||
Objective C | [https://github.com/appium/selenium-objective-c](https://github.com/appium/selenium-objective-c)
|
||||
PHP | [https://github.com/appium/php-client](https://github.com/appium/php-client)
|
||||
C# (.NET) | [https://github.com/appium/appium-dotnet-driver](https://github.com/appium/appium-dotnet-driver)
|
||||
RobotFramework | [https://github.com/serhatbolsu/robotframework-appiumlibrary](https://github.com/serhatbolsu/robotframework-appiumlibrary)
|
||||
|
||||
W3C WebDriver protocol compatible clients also work.
|
||||
|
||||
@@ -18,7 +18,8 @@ to Appium, you will need [Node.js and NPM](http://nodejs.org) (use
|
||||
[n](https://github.com/visionmedia/n), or `brew install node` to install
|
||||
Node.js. Make sure you have not installed Node or Appium with `sudo`, otherwise
|
||||
you'll run into problems). We recommend the latest stable version, though
|
||||
Appium supports Node 10+.
|
||||
Appium supports Node.js 12+.
|
||||
(The minimal Node.js version follows Node.js' [release schedule](https://github.com/nodejs/release#readme)
|
||||
|
||||
The actual installation is as simple as:
|
||||
|
||||
@@ -184,7 +185,7 @@ So here is how we begin to construct a session in our test file:
|
||||
```js
|
||||
// javascript
|
||||
const opts = {
|
||||
path: '',
|
||||
path: '/wd/hub',
|
||||
port: 4723,
|
||||
capabilities: {
|
||||
platformName: "Android",
|
||||
@@ -239,7 +240,7 @@ const wdio = require("webdriverio");
|
||||
const assert = require("assert");
|
||||
|
||||
const opts = {
|
||||
path: '',
|
||||
path: '/wd/hub',
|
||||
port: 4723,
|
||||
capabilities: {
|
||||
platformName: "Android",
|
||||
|
||||
@@ -7,8 +7,8 @@ applications on iOS mobile, Android mobile, and Windows desktop platforms.
|
||||
supports Safari on iOS and Chrome or the built-in 'Browser' app on Android).
|
||||
**Hybrid apps** have a wrapper around a "webview" -- a native control that
|
||||
enables interaction with web content. Projects like [Apache Cordova](https://cordova.apache.org)
|
||||
or [Phonegap](http://phonegap.com/) make it easy to build apps using web
|
||||
technologies that are then bundled into a native wrapper, creating a hybrid app.
|
||||
make it easy to build apps using web technologies that are then bundled
|
||||
into a native wrapper, creating a hybrid app.
|
||||
|
||||
Importantly, Appium is "cross-platform": it allows you to write tests against
|
||||
multiple platforms (iOS, Android, Windows), using the same API. This enables
|
||||
@@ -79,8 +79,7 @@ up a lot of possibilities: we can write our test code in any language that has
|
||||
a http client API, but it is easier to use one of the [Appium client
|
||||
libraries](http://appium.io/downloads). We can put the server on a different
|
||||
machine than our tests are running on. We can write test code and rely on
|
||||
a cloud service like [Sauce Labs](https://saucelabs.com/products/mobile-app-testing) & [LambdaTest](https://www.lambdatest.com/feature) to receive and
|
||||
interpret the commands.
|
||||
cloud services to receive and interpret the commands.
|
||||
|
||||
**Session**<br/>
|
||||
Automation is always performed in the context of a session. Clients initiate
|
||||
|
||||
@@ -1,68 +1,28 @@
|
||||
## Appium Platform Support
|
||||
|
||||
Appium supports a variety of platforms and testing modalities (native,
|
||||
hybrid, web, real devices, simulators, etc...). This document is designed to
|
||||
make explicit the level of support and requirements for each of these.
|
||||
hybrid, web, real devices, simulators, etc...).
|
||||
This documentation aims to list available drivers and each repository.
|
||||
|
||||
### iOS Support
|
||||
## Drivers supported by the Appium team
|
||||
|
||||
iOS automation is supported with two drivers:
|
||||
This section lists drivers that are supported by Appium team.
|
||||
|
||||
* The [XCUITest Driver](/docs/en/drivers/ios-xcuitest.md)
|
||||
* The (deprecated) [UIAutomation Driver](/docs/en/drivers/ios-uiautomation.md)
|
||||
| Platform | Driver | Repository |
|
||||
| :---: | :---: | :--- |
|
||||
| iOS | [XCUITest Driver](/docs/en/drivers/ios-xcuitest.md) | https://github.com/appium/appium-xcuitest-driver |
|
||||
| iOS | [safaridriver](/docs/en/drivers/safari.md) | https://github.com/appium/appium-safari-driver |
|
||||
| Android | [UiAutomator2 Driver](/docs/en/drivers/android-uiautomator2.md) | https://github.com/appium/appium-uiautomator2-driver |
|
||||
| Android | [Espresso Driver](/docs/en/drivers/android-espresso.md) | https://github.com/appium/appium-espresso-driver |
|
||||
| Android, macOS, Windows, Linux | [geckodriver](/docs/en/drivers/gecko.md) | https://github.com/appium/appium-geckodriver |
|
||||
| macOS | [Mac2Driver](/docs/en/drivers/mac2.md) | https://github.com/appium/appium-mac2-driver |
|
||||
| Windows | [WinAppDriver](/docs/en/drivers/windows.md) | https://github.com/appium/appium-windows-driver |
|
||||
|
||||
Please refer to these driver docs for setup instructions.
|
||||
## Drivers supported by their own communities
|
||||
|
||||
* Versions: 12.2 and up (as a rule, Appium supports the latest two iOS versions)
|
||||
* Devices: Simulator and real device for iPhone, iPad and tvOS
|
||||
* Native app support: Yes, with debug version of .app (simulator),
|
||||
or correctly-signed .ipa (real devices). Underlying support is provided by
|
||||
Apple's [XCUITest](https://developer.apple.com/reference/xctest) (or [UIAutomation](https://web.archive.org/web/20160904214108/https://developer.apple.com/library/ios/documentation/DeveloperTools/Reference/UIAutomationRef/) for older versions)
|
||||
framework.
|
||||
* Mobile web support: Yes, via automation of mobile Safari. For real devices,
|
||||
`ios-webkit-remote-debugger` is required, and automation of native aspects of
|
||||
the Safari interface is not possible. See the [mobile web doc](/docs/en/writing-running-appium/web/mobile-web.md) for instructions.
|
||||
* Hybrid support: Yes. For real devices, ios-webkit-remote-debugger is
|
||||
required. See the [hybrid doc](/docs/en/writing-running-appium/web/hybrid.md) for instructions.
|
||||
* Support for automating multiple apps in one session: No
|
||||
* Support for automating multiple devices simultaneously: No
|
||||
* Support for automating vendor-provided or third-party apps: Only
|
||||
vendor-provided apps (Preferences, Maps, etc...), and only on the simulator. For iOS 10+, you can automate the home screen as well.
|
||||
* Support for automating custom, non-standard UI controls: Minimal. You need to
|
||||
set accessibility information on the control which enables some basic
|
||||
automation.
|
||||
|
||||
### Android Support
|
||||
|
||||
Android automation is supported with two drivers:
|
||||
|
||||
* The [UiAutomator2 Driver](/docs/en/drivers/android-uiautomator2.md)
|
||||
* The (deprecated) [UiAutomator Driver](/docs/en/drivers/android-uiautomator.md)
|
||||
|
||||
Please refer to these driver docs for setup instructions.
|
||||
|
||||
* Versions: 4.3 and up
|
||||
* Versions 4.3 and up are supported via Appium's [UiAutomator and UiAutomator2](http://developer.android.com/tools/testing-support-library/index.html#UIAutomator)
|
||||
libraries. UiAutomator is the default driver.
|
||||
* Devices: Android emulators and real Android devices
|
||||
* Native app support: Yes
|
||||
* Mobile web support: Yes. Automation
|
||||
is effected using a bundled [Chromedriver](http://chromedriver.chromium.org)
|
||||
server as a proxy. With 4.3, automation works on official Chrome
|
||||
browser or Chromium only. With 4.4+, automation also works on the built-in
|
||||
"Browser" app. Chrome/Chromium/Browser must already be installed on the
|
||||
device under test. See the [mobile web doc](/docs/en/writing-running-appium/web/mobile-web.md) for instructions.
|
||||
* Hybrid support: Yes. See the [hybrid doc](/docs/en/writing-running-appium/web/hybrid.md) for instructions.
|
||||
* With default Appium automation backend: versions 4.4 and up
|
||||
* Support for automating multiple apps in one session: Yes
|
||||
* Support for automating multiple devices simultaneously: Yes,
|
||||
though Appium must be started using different ports for the server
|
||||
parameters `--port`, `--bootstrap-port` and/or
|
||||
`--chromedriver-port`. See the [server args doc](/docs/en/writing-running-appium/server-args.md) for more
|
||||
information on these parameters.
|
||||
* Support for automating vendor-provided or third-party apps: Yes
|
||||
* Support for automating custom, non-standard UI controls: No
|
||||
|
||||
### Windows Desktop Support
|
||||
|
||||
See the [Windows Driver](/docs/en/drivers/windows.md) doc for details
|
||||
| Driver name | Repository |
|
||||
| :---: | :--- |
|
||||
| Flutter | https://github.com/appium-userland/appium-flutter-driver |
|
||||
| You.i Engine | https://github.com/YOU-i-Labs/appium-youiengine-driver |
|
||||
| Roku | https://github.com/projectxyzio/appium-roku-driver |
|
||||
| WebOS | https://github.com/sharkyStudy/appium-webos-driver |
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
## Selenium Grid
|
||||
## Selenium Grid 4
|
||||
|
||||
You are able to register your appium server with a local [Selenium grid](https://github.com/SeleniumHQ/selenium/wiki/Grid2) ([setup docs](https://www.selenium.dev/documentation/en/grid/grid_3/setting_up_your_own_grid/)) by using the
|
||||
`Relay` feature in Grid 4 allows you to proxy Appium requests to an appium server instance.
|
||||
|
||||
Please check [Relaying commands to a service endpoint that supports WebDriver](https://www.selenium.dev/documentation/grid/configuration/toml_options/#relaying-commands-to-a-service-endpoint-that-supports-webdriver) and [Selenium Grid 4 and Appium together in harmony](https://www.youtube.com/watch?v=3_aP2rsqZD0) about the configuration and for more details.
|
||||
|
||||
## Selenium Grid 3
|
||||
|
||||
You are able to register your appium server with a local [Selenium grid](https://github.com/SeleniumHQ/selenium/wiki/Grid2) ([setup docs](https://www.selenium.dev/documentation/legacy/grid_3/setting_up_your_own_grid/)) by using the
|
||||
`--nodeconfig` server parameter.
|
||||
|
||||
```center
|
||||
|
||||
@@ -129,6 +129,13 @@ If you use these image-related methods, to continue accessing them you will need
|
||||
|
||||
Image-related commands will also be removed on the client side of things, which means you will need to follow the instructions on the plugin README for installing client-side plugins to access these features.
|
||||
|
||||
### :bangbang: Execute Driver Script command moved to plugin
|
||||
|
||||
If you use the advanced Execute Driver Script feature (which allows you to send in a WebdriverIO script to have it executed completely on the server instead of command-by-command from the client), this functionality has been moved to a plugin. Here's what to do to keep using it:
|
||||
|
||||
1. Install the plugin: `appium plugin install execute-driver`
|
||||
2. Ensure you start the Appium server with access to run the plugin by including it in the list of plugins designated on the command line, e.g., `appium --use-plugins=execute-driver`
|
||||
|
||||
### :bangbang: Old drivers removed
|
||||
|
||||
The old iOS and Android (UiAutomator 1) drivers and related tools (e.g., `authorize-ios`) have been removed. They haven't been relevant for many years anyway.
|
||||
|
||||
@@ -10,6 +10,7 @@ The important capabilities:
|
||||
- `chromedriverPort` the chromedriver port (if using webviews or chrome)
|
||||
- `mjpegServerPort` If you are using [appium-uiautomator2-driver](https://github.com/appium/appium-uiautomator2-driver), set a unique MJPEG server port for each parallel session. Otherwise you might get a port conflict such as in [this issue](https://github.com/appium/appium/issues/7745).
|
||||
- `systemPort` If you are using [appium-uiautomator2-driver](https://github.com/appium/appium-uiautomator2-driver), set a unique system port for each parallel session. Otherwise you might get a port conflict such as in [this issue](https://github.com/appium/appium/issues/7745).
|
||||
- `chromedriverPort` If you are using [appium-chromedriver](https://github.com/appium/appium-chromedriver), set a unique ChromeDriver port for each parallel session. Otherwise, you might get a port conflict with the error message `Address already in use (48)` in the ChromeDriver log.
|
||||
|
||||
### Parallel iOS Tests
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## Settings
|
||||
|
||||
Settings are a new concept introduced by appium. They are currently not a part of the Mobile JSON Wire Protocol, or the Webdriver spec.
|
||||
Settings are a new concept introduced by Appium. They are currently not a part of the Mobile JSON Wire Protocol, or the Webdriver spec.
|
||||
|
||||
Settings are a way to specify the behavior of the appium server.
|
||||
|
||||
@@ -48,64 +48,13 @@ Settings are implemented via the following API endpoints:
|
||||
|
||||
[Image Elements](https://github.com/appium/appium/blob/master/docs/en/advanced-concepts/image-elements.md) also has image elements specific settings.
|
||||
|
||||
### Android Only
|
||||
### UiAutomator2
|
||||
|
||||
|Name|Description|Values|
|
||||
|----|----|----|
|
||||
| `ignoreUnimportantViews` | Controls whether the Android device should use `setCompressedLayoutHeirarchy()` which ignores all views which are marked IMPORTANT_FOR_ACCESSIBILITY_NO or IMPORTANT_FOR_ACCESSIBILITY_AUTO (and have been deemed not important by the system), in an attempt to make things less confusing or faster. Defaults to `false`. | `false` or `true` |
|
||||
Please refer to the documentation on the [UiAutomator2 Driver repository](https://github.com/appium/appium-uiautomator2-driver#settings-api)
|
||||
|
||||
#### UiAutomator2
|
||||
|
||||
|Name|Description|Values|
|
||||
|----|----|----|
|
||||
| `actionAcknowledgmentTimeout` | Same as: [setActionAcknowledgmentTimeout](https://developer.android.com/reference/android/support/test/uiautomator/Configurator.html#setActionAcknowledgmentTimeout(long)). If a negative value is given, it would set to default (3 * 1000 milliseconds). Handled by [UiAutomator Configurator](https://developer.android.com/reference/android/support/test/uiautomator/Configurator.html) in Android API 18 and above. | e.g., `5000` |
|
||||
| `allowInvisibleElements` | Controls whether the Android device should show all elements, visible and invisible. Defaults to `false`. | `false` or `true` |
|
||||
| `enableMultiWindows` | If enabled then the page source and xpath lookup will include all windows available to the accessibility rather than the active one only. It might help to resolve finding elements on windows like `android.widget.PopupWindow`. Defaults to `false` and returns an active root window. Read [appium-uiautomator2-server#301](https://github.com/appium/appium-uiautomator2-server/pull/301) for more details. | `true` or `false` |
|
||||
| `enableNotificationListener` | Controls whether the Android device should enable or disable the `NotificationListener`. Defaults to `true`. | `false` or `true` |
|
||||
| `keyInjectionDelay` | Same as: [setKeyInjectionDelay](https://developer.android.com/reference/android/support/test/uiautomator/Configurator.html#setKeyInjectionDelay(long)). If a negative value is given, it would set to default (0 milliseconds). Handled by [UiAutomator Configurator](https://developer.android.com/reference/android/support/test/uiautomator/Configurator.html) in Android API 18 and above. | e.g., `5000` |
|
||||
| `mjpegBilinearFiltering` | Controls whether or not to apply bilinear filtering to source screenshot resize algorithm. Enabling this flag may improve the quality of the resulting scaled bitmap, but will introduce a [small] performance hit. Defaults to `false`. | `false` or `true` |
|
||||
| `mjpegScalingFactor` | Controls the scaling factor of streamed screenshots. 100 means no scaling is applied (e.g. 100% of the original size). The bigger image size is the more CPU performance is needed to encode it. Integer values between `1` and `100` are available. Defaults to `50`. | `1` to `100` |
|
||||
| `mjpegServerFramerate` | Controls the framerate of streamed screenshots. Greater framerate values create greater CPU load. That actual maximum framerate value is limited by the performance of the device under test. Integer values between `1` and `60` are available. Defaults to `10`. | `1` to `60` |
|
||||
| `mjpegServerPort` | Controls the MJPEG server port. Integer values between `1024` and `65535` are available. Defaults to `7810`. | `1024` to `65535` |
|
||||
| `mjpegServerScreenshotQuality` | Controls the quality of streamed screenshots. Where the best quality is 100 and the worst is 1. The greater the value is the more CPU time is needed to encode a single bitmap into JPEG format. Usually a value between 25 and 90 is fine for this setting. Greater values affect performance too much without visible quality improvements and lower ones introduce visible distortions into the resulting image. Integer values between `1` and `100` are available. Defaults to `50`. | `1` to `100` |
|
||||
| `normalizeTagNames` | Translate all class names used as XML tags to the limited set of ASCII characters supported by Apache Harmony library. Used by default in Android to avoid possible XML parsing exceptions caused by XPath lookup. The translation is based on [junidecode](https://github.com/gcardone/junidecode). This prevents [this error case](https://github.com/appium/appium/issues/11854). Defaults to `false`. | `false` or `true` |
|
||||
| `scrollAcknowledgmentTimeout` | Same as: [setScrollAcknowledgmentTimeout](https://developer.android.com/reference/android/support/test/uiautomator/Configurator.html#setScrollAcknowledgmentTimeout(long)). If a negative value is given, it would set to default (200 milliseconds). Handled by [UiAutomator Configurator](https://developer.android.com/reference/android/support/test/uiautomator/Configurator.html) in Android API 18 and above. | e.g. `300` |
|
||||
| `serverPort` | Controls the server port. Integer values between `1024` and `65535` are available. Defaults to `6790`. | `1024` to `65535` |
|
||||
| `shutdownOnPowerDisconnect` | Shutdown the server through the broadcast receiver on [ACTION_POWER_DISCONNECTED](https://developer.android.com/reference/android/content/Intent.html#ACTION_POWER_DISCONNECTED). Defaults to `true`. | `false` or `true` |
|
||||
| `simpleBoundsCalculation` | If enabled then the `bounds` attribute will be calculated using a less accurate but simpler method that may improve performance. First available in Appium 1.18.0. Defaults to `false`. | `false` or `true` |
|
||||
| `trackScrollEvents` | Controls the tracking of scroll events as they happen. If `true`, a field, `lastScrollData`, is added to the results of `getSession`, which can then be used to check on scroll progress. Turning this feature off significantly increases touch action performance. Defaults to `true`. | `false` or `true` |
|
||||
| `waitForIdleTimeout` | Same as: [setWaitForIdleTimeout](https://developer.android.com/reference/android/support/test/uiautomator/Configurator.html#setWaitForIdleTimeout(long)). If a negative value is given, it would set to default (10 * 1000 milliseconds). Handled by [UiAutomator Configurator](https://developer.android.com/reference/android/support/test/uiautomator/Configurator.html) in Android API 18 and above. | e.g. `10000` |
|
||||
| `waitForSelectorTimeout` | Same as: [setWaitForSelectorTimeout](https://developer.android.com/reference/android/support/test/uiautomator/Configurator.html#setWaitForSelectorTimeout(long)). If a negative value is given, it would set to default (10 * 1000 milliseconds). Handled by [UiAutomator Configurator](https://developer.android.com/reference/android/support/test/uiautomator/Configurator.html) in Android API 18 and above. | e.g. `10000` |
|
||||
| `wakeLockTimeout` | Controls the timeout of the acquired wake lock. The lock is acquired on server startup and is held until the UIAutomator2 server is killed or the timeout expires. Setting this value to zero or a negative number will release the lock immediately if it is held. Defaults to '24 * 60 * 60 * 1000' milliseconds. | e.g. `0`, `60000` (1 min) |
|
||||
|`useResourcesForOrientationDetection`| Whether to use application resource properties to figure out the current device orientation. By default the orientation value is based on the current rotation, which might be incorrect for some particular device types (usually tablets). `false` by default. Available since Appium 1.20.0 | e.g. `true` |
|
||||
|
||||
### iOS Only
|
||||
|
||||
#### XCUITest
|
||||
|
||||
|Name|Description|Values|Appium versions|
|
||||
|----|----|----|----|
|
||||
|`nativeWebTap`| Enable "real", non-javascript-based web taps in Safari. Default: `false`. Warning: depending on viewport size/ratio; this might not accurately tap an element. | `true`, `false` |1.7.0+|
|
||||
|`mjpegServerScreenshotQuality`| The quality of the screenshots generated by the screenshots broadcaster, expressed as a value from `0` to `100`. The value `0` represents the maximum compression (or lowest quality) while the value `100` represents the least compression (or best quality). The default value is `25`. | e.g., `10` |1.10.0+|
|
||||
|`mjpegServerFramerate`| The framerate at which the background screenshots broadcaster should broadcast screenshots in range `1..60`. The default value is `10` (Frames Per Second). Setting zero value will cause the framerate to be at its maximum possible value. | e.g., `60` |1.10.0+|
|
||||
|`screenshotQuality`| Changes the quality of phone display screenshots following [xctest/xctimagequality](https://developer.apple.com/documentation/xctest/xctimagequality?language=objc). Default value is `1`. Read `screenshotQuality` in [appium-xcuitest-driver](https://github.com/appium/appium-xcuitest-driver#desired-capabilities) | e.g. `0`, `1`, `2` |1.10.0+|
|
||||
|`mjpegScalingFactor`| Changes the scale of screenshots. Defaults to `100`, no scaling. Integer between `1` and `100` are available. | e.g. `1`, `50`, `100` |1.12.0+|
|
||||
|`keyboardAutocorrection`| Changes the 'Auto-Correction' preference in _Keyboards_ setting. Defaults to `false` when WDA starts as xctest. | `true`, `false` |1.14.0+|
|
||||
|`keyboardPrediction`| Changes the 'Predictive' preference in _Keyboards_ setting. Defaults to `false` when WDA starts as xctest. | `true`, `false` |1.14.0+|
|
||||
|`customSnapshotTimeout` (`snapshotTimeout` before 1.20.0) | Set how much time is allowed to resolve a single accessibility snapshot with custom attributes. _Snapshots_ are mainly used for page source generation, XML lookup and custom attributes retrieval (these are visibility and accessibility ones). It might be necessary to increase this value if the actual page source is very large and contains hundreds of UI elements. Defaults to 15 seconds. Since Appium 1.20.0 if this timeout expires and no custom snapshot could be made then WDA tries to calculate the missing attributes using its own algorithms, so setting this value to zero might speed up, for example, page source retrieval, but for the cost of some element attribute preciseness. | e.g. `10`, `100` (seconds) |1.15.0+|
|
||||
|`waitForIdleTimeout`|The amount of time in float seconds to wait until the application under test is idling. XCTest requires the app's main thread to be idling in order to execute any actions on it, so each action, like single click, might take a lot of time in case your app is constantly hogging the main thread. The default value is `10` (seconds). Setting it to zero disables idling checks completely (not recommended).|e.g. `2.5`|1.20.0+|
|
||||
|`animationCoolOffTimeout`|The amount of time in float seconds to wait until the application under test does not have any active animations. This check is usually applied after each automation action that is supposed to change the state of the application under test, like `click` one, and blocks XCTest until the transition of the tested application to a new state completes or the cool off timeout occurs. The default value is `2` (seconds). Setting it to zero disables animation checks completely.|e.g. `1.5`, `0`|1.20.0+|
|
||||
|`snapshotMaxDepth`| Changes the value of maximum depth for traversing elements source tree. It may help to prevent out of memory or timeout errors while getting the elements source tree, but it might restrict the depth of source tree. Please consider restricting this value if you observed an error like _Timed out snapshotting com.apple.testmanagerd..._ message or _Cannot get 'xml' source of the current application_ in your Appium log since they are possibly timeout related. A part of elements source tree might be lost if the value was too small. Defaults to `50` | e.g. `100` | 1.17.0+ |
|
||||
|`useFirstMatch` | Enabling this setting makes single element lookups faster, but there is the known [problem](https://github.com/appium/appium/issues/10101) related to nested elements lookup. Defaults to `false`. |`true`, `false` |1.15.0+|
|
||||
|`reduceMotion`| Changes the 'reduce motion' preference of accessibility feature. | `true`, `false` |1.15.0+|
|
||||
|`defaultActiveApplication`| Sets the hint for active application selection. This helps WebDriverAgent to select the current application if there are multiple items in the active applications list and the desired one is also one of them. The setting is particularly useful for split-screen apps automation. Defaults to `auto`, which makes WebDriverAgent to select the application whose element is located at `screenPoint` location or a single item from the active apps list if the length of this list is equal to one. | e.g., `com.apple.Preferences` |1.15.0+|
|
||||
|`activeAppDetectionPoint`| Defines the coordinates of the current screen point. WebDriverAgent uses this point to detect the active application if multiple application are active on the screen. The format of this value is `x,y`, where x and y are float or integer numbers representing valid screen coordinates. Setting this value to a point outside the actual screen coordinates might corrupt WebDriverAgent functionality. By default the screen point coordinates equal to 20% of the minimum screen dimension each, e.g. `MIN(w, h) * 0.2, MIN(w, h) * 0.2` | e.g. `100,300` |1.15.0+|
|
||||
| `includeNonModalElements` | Whether returns all of elements including no modal dialogs on iOS 13+. It fixes [cannot find elements on nested modal presentations](https://github.com/appium/appium/issues/13227), but it might make visibility attributes unreliable. You could also enable `shouldUseTestManagerForVisibilityDetection` setting (defaults to `false`) or `simpleIsVisibleCheck` capability to improve the visibility detection. This issue may happen between iOS 13.0 to 13.2 (and Xcode 11.0 to 11.2). The query issued in `includeNonModalElements` returns `nil` with newer iOS/Xcode versions and Appium/WDA return proper elements three without this setting being used. Defaults to `false`. | `true`, `false` |1.15.0+|
|
||||
| `acceptAlertButtonSelector` | Allows to customize accept alert button selector. It helps you to handle an arbitrary element as accept button in `accept alert` command. The selector should be a valid [class chain](https://github.com/facebookarchive/WebDriverAgent/wiki/Class-Chain-Queries-Construction-Rules) expression, where the search root is the alert element itself. The default button location algorithm is used if the provided selector is wrong or does not match any element. | e.g., <code>**/XCUIElementTypeButton[\`label CONTAINS[c] 'accept'\`]</code> | 1.16.0+ |
|
||||
| `dismissAlertButtonSelector` | Allows to customize dismiss alert button selector. It helps you to handle an arbitrary element as dismiss button in `dismiss alert` command. The selector should be a valid [class chain](https://github.com/facebookarchive/WebDriverAgent/wiki/Class-Chain-Queries-Construction-Rules) expression, where the search root is the alert element itself. The default button location algorithm is used if the provided selector is wrong or does not match any element. | e.g., <code>**/XCUIElementTypeButton[\`label CONTAINS[c] 'dismiss'\`]</code> | 1.16.0+ |
|
||||
| `screenshotOrientation` | Adjust screenshot orientation for iOS. Appium tries to return a screenshot and adjust its orientation properly using internal heuristics, but sometimes it does not work, especially in landscape mode. The actual screenshot orientation depends on various factors such as OS versions, model versions and whether this is a real or simulator device. This option allows you to enforce the given image orientation. Defaults to `auto`.| `auto`, `portrait`, `portraitUpsideDown`, `landscapeRight`, `landscapeLeft` | 1.17.0+ |
|
||||
| `boundElementsByIndex` | Whether to look up elements with [`allElementsBoundByAccessibilityElement`](https://developer.apple.com/documentation/xctest/xcuielementquery/1500816-allelementsboundbyaccessibilitye) (default) or [`allElementsBoundByIndex`](https://developer.apple.com/documentation/xctest/xcuielementquery/1500945-allelementsboundbyindex). [This Stack Overflow topic](https://stackoverflow.com/questions/49307513/meaning-of-allelementsboundbyaccessibilityelement) explains the differences. Defaults to `false` | `true`, `false` | 1.18.0+ |
|
||||
### XCUITest
|
||||
|
||||
Please refer to the documentation on the [XCUITest Driver repository](https://github.com/appium/appium-xcuitest-driver#settings-api)
|
||||
|
||||
### Mac2
|
||||
|
||||
|
||||
@@ -55,15 +55,13 @@ so you'll see the icon of WebDriverAgentRunner application on the springboard.
|
||||
|
||||
WebDriverAgent application acts as a REST server, which proxies external API requests to native XCTest calls
|
||||
for your application under test. The server address will be _localhost_ if you run your tests on Simulator
|
||||
or the actual phone IP address in case of real device.
|
||||
We use [appium-ios-device](https://github.com/appium/appium-ios-device) to route network requests
|
||||
or the actual phone IP address in case of real device. Appium uses [appium-ios-device](https://github.com/appium/appium-ios-device) to route network requests
|
||||
to a real device from _localhost_ via USB, which means one can use this tool to unify WDA network
|
||||
address for Simulator and for real device.
|
||||
|
||||
You can use [appium-ios-device](https://github.com/appium/appium-ios-device) to connect to
|
||||
a remote device requiring the module from your JavaScript code as same as Appium.
|
||||
Alternatively, you can also use _iproxy_ to handle WebDriverAgent outside Appium.
|
||||
It is available via `node install -g iproxy`.
|
||||
Alternatively, you can also use [iproxy](https://github.com/libimobiledevice/libusbmuxd#iproxy), [go-ios](https://github.com/danielpaulus/go-ios) or [tidevice](https://github.com/alibaba/taobao-iphone-device) to handle WebDriverAgent process outside Appium. For instance, `iproxy` could be installed using npm: `npm install -g iproxy`.
|
||||
|
||||
This helper class written in Java illustrates the main implementation details
|
||||
wit _iproxy_:
|
||||
|
||||
@@ -101,4 +101,4 @@ Name of the current [activity](https://developer.android.com/reference/android/a
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/activity/current-activity.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L430)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L440)
|
||||
|
||||
@@ -101,4 +101,4 @@ Name of the current [package](https://developer.android.com/reference/java/lang/
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/activity/current-package.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L433)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L443)
|
||||
|
||||
@@ -113,4 +113,4 @@ null
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/activity/start-activity.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L526)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L536)
|
||||
|
||||
@@ -114,4 +114,4 @@ null
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/activate-app.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L446)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L456)
|
||||
|
||||
@@ -113,4 +113,4 @@ Current the target app status. (Clients wrap the response properly) `0` is not i
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/app-state.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L481)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L491)
|
||||
|
||||
@@ -120,4 +120,4 @@ null
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/background-app.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L557)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L567)
|
||||
|
||||
@@ -101,4 +101,4 @@ null
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/close-app.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L551)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L561)
|
||||
|
||||
@@ -104,4 +104,4 @@ null
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/end-test-coverage.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L560)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L570)
|
||||
|
||||
@@ -104,4 +104,4 @@ null
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/get-app-strings.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L563)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L573)
|
||||
|
||||
@@ -108,4 +108,4 @@ null
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/install-app.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L437)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L447)
|
||||
|
||||
@@ -108,4 +108,4 @@ Return true if installed, false if not (`boolean`)
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/is-app-installed.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L473)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L483)
|
||||
|
||||
@@ -107,4 +107,4 @@ null
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/launch-app.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L548)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L558)
|
||||
|
||||
@@ -109,4 +109,4 @@ null
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/remove-app.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L455)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L465)
|
||||
|
||||
@@ -101,4 +101,4 @@ null
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/reset-app.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L554)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L564)
|
||||
|
||||
@@ -114,4 +114,4 @@ null
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/app/terminate-app.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L464)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L474)
|
||||
|
||||
@@ -111,4 +111,4 @@ null
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/authentication/finger-print.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L389)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L399)
|
||||
|
||||
@@ -50,8 +50,8 @@ get_clipboard
|
||||
|
||||
Get the content of the system clipboard
|
||||
|
||||
(For iOS real devices) Apple security preferences require the WebDriverAgentRunner application to be in [foreground](https://github.com/appium/WebDriverAgent/issues/330) in order to be able to receive the system clipboard content. Otherwise an empty string is always returned. Consider using [Activate App](/docs/en/commands/device/app/activate-app.md) and [Background App](/docs/en/commands/device/app/background-app.md) to change the foreground application. Activate App command cannot launch the WebDriverAgent properly on some environments. It depends on XCTest framework by Apple. Then, you should launch the WebDriverAgent using its Springboard's application icon. Follow the example below.
|
||||
1. Open springboard, `@driver.activate_app 'com.apple.springboard'`. 2. Find the WDA icon with `@driver.find_element :accessibility_id, 'WebDriverAgentRunner-Runner'` (It should be visible on the screen) and click it. 3. Call the get clipboard API. 4. Open the application under test with the [Activate App](/docs/en/commands/device/app/activate-app.md).
|
||||
(For iOS 13+ real devices) Apple security preferences require the WebDriverAgentRunner application to be in [foreground](https://github.com/appium/WebDriverAgent/issues/330) in order to be able to receive the system clipboard content. Otherwise an empty string is always returned. Consider using [Activate App](/docs/en/commands/device/app/activate-app.md) and [Background App](/docs/en/commands/device/app/background-app.md) to change the foreground application. Activate App command cannot launch the WebDriverAgent properly on some environments. It depends on XCTest framework by Apple. Then, you should launch the WebDriverAgent using its Springboard's application icon. Follow the example below.
|
||||
1. Open Springboard, `@driver.activate_app 'com.apple.springboard'`. 2. Find the WDA icon with `@driver.find_element :accessibility_id, 'WebDriverAgentRunner-Runner'` (It should be visible on the screen) and click it. 3. Call the get clipboard API. 4. Open the application under test with the [Activate App](/docs/en/commands/device/app/activate-app.md).
|
||||
|
||||
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/clipboard/get-clipboard.yml)
|
||||
|
||||
@@ -50,7 +50,8 @@ set_clipboard content: 'happy testing'
|
||||
## Description
|
||||
|
||||
Set the content of the system clipboard
|
||||
|
||||
(For iOS 15+ real devices) Apple security preferences require the WebDriverAgentRunner application to be in [foreground](https://github.com/appium/appium/issues/16526) in order to set the system clipboard content. Consider using [Activate App](/docs/en/commands/device/app/activate-app.md) and [Background App](/docs/en/commands/device/app/background-app.md) to change the foreground application. Activate App command cannot launch the WebDriverAgent properly on some environments. It depends on XCTest framework by Apple. Then, you should launch the WebDriverAgent using its Springboard's application icon. Follow the example below.
|
||||
1. Open Springboard, `@driver.activate_app 'com.apple.springboard'`. 2. Find the WDA icon with `@driver.find_element :accessibility_id, 'WebDriverAgentRunner-Runner'` (It should be visible on the screen) and click it. 3. Call the get clipboard API. 4. Open the application under test with the [Activate App](/docs/en/commands/device/app/activate-app.md).
|
||||
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/clipboard/set-clipboard.yml)
|
||||
## Support
|
||||
|
||||
@@ -105,4 +105,4 @@ null
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/emulator/power_ac.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L416)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L426)
|
||||
|
||||
@@ -105,4 +105,4 @@ null
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/emulator/power_capacity.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L413)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L423)
|
||||
|
||||
@@ -103,4 +103,4 @@ Contents of file in base64 (`string`)
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/files/pull-file.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L505)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L515)
|
||||
|
||||
@@ -103,4 +103,4 @@ A string of Base64 encoded data, representing a zip archive of the contents of t
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/files/pull-folder.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L508)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L518)
|
||||
|
||||
@@ -107,4 +107,4 @@ null
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/files/push-file.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L502)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L512)
|
||||
|
||||
@@ -101,4 +101,4 @@ True if the device is locked, false if not (`boolean`)
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/interactions/is-locked.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L368)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L378)
|
||||
|
||||
@@ -105,4 +105,4 @@ null
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/interactions/lock.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L362)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L372)
|
||||
|
||||
@@ -101,4 +101,4 @@ null
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/interactions/rotate.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L425)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L435)
|
||||
|
||||
@@ -101,4 +101,4 @@ null
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/interactions/shake.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L355)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L365)
|
||||
|
||||
@@ -105,4 +105,4 @@ null
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/interactions/unlock.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L365)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L375)
|
||||
|
||||
@@ -106,4 +106,4 @@ null
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/keys/hide-keyboard.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L496)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L506)
|
||||
|
||||
@@ -99,4 +99,4 @@ True if the keyboard is shown. (`boolean`)
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/keys/is-keyboard-shown.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L499)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L509)
|
||||
|
||||
@@ -109,4 +109,4 @@ null
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/keys/long-press-keycode.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L386)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L396)
|
||||
|
||||
@@ -109,4 +109,4 @@ null
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/keys/press-keycode.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L383)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L393)
|
||||
|
||||
@@ -104,4 +104,4 @@ null
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/network/gsm-call.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L395)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L405)
|
||||
|
||||
@@ -103,4 +103,4 @@ null
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/network/gsm-signal.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L398)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L408)
|
||||
|
||||
@@ -103,4 +103,4 @@ null
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/network/gsm-voice.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L410)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L420)
|
||||
|
||||
@@ -101,4 +101,4 @@ null
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/network/network-speed.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L419)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L429)
|
||||
|
||||
@@ -104,4 +104,4 @@ null
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/network/send-sms.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L392)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L402)
|
||||
|
||||
@@ -99,4 +99,4 @@ null
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/network/toggle-airplane-mode.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L511)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L521)
|
||||
|
||||
@@ -107,4 +107,4 @@ null
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/network/toggle-data.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L514)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L524)
|
||||
|
||||
@@ -101,4 +101,4 @@ null
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/network/toggle-location-services.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L520)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L530)
|
||||
|
||||
@@ -107,4 +107,4 @@ null
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/network/toggle-wifi.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L517)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L527)
|
||||
|
||||
@@ -105,4 +105,4 @@ The information type of the system state which is supported to read as like cpu,
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/performance-data/get-performance-data.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L380)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L390)
|
||||
|
||||
@@ -101,4 +101,4 @@ The available performance data types (cpuinfo|batteryinfo|networkinfo|memoryinfo
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/performance-data/performance-data-types.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L377)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L387)
|
||||
|
||||
@@ -23,9 +23,7 @@ self.driver.start_recording_screen()
|
||||
// webdriver.io example
|
||||
driver.startRecordingScreen();
|
||||
|
||||
// wd example
|
||||
await driver.startRecordingScreen();
|
||||
|
||||
// Not supported
|
||||
```
|
||||
|
||||
```ruby
|
||||
@@ -78,7 +76,7 @@ driver.StartRecordingScreen(
|
||||
|[Java](https://github.com/appium/java-client/releases/latest)| All | [static.javadoc.io](https://static.javadoc.io/io.appium/java-client/6.1.0/io/appium/java_client/screenrecording/CanRecordScreen.html#startRecordingScreen-T-) |
|
||||
|[Python](https://github.com/appium/python-client/releases/latest)| All | [appium.github.io](https://appium.github.io/python-client-sphinx/webdriver.extensions.html#webdriver.extensions.screen_record.ScreenRecord.start_recording_screen) |
|
||||
|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| All | |
|
||||
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | [github.com](https://github.com/admc/wd/blob/master/lib/commands.js#L3412) |
|
||||
|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| All | |
|
||||
|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| All | [Android](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Android/Device#start_recording_screen-instance_method) [iOS](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Ios/Xcuitest/Device#start_recording_screen-instance_method) |
|
||||
|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| None | [github.com](https://github.com/appium/appium-dotnet-driver/) |
|
||||
|
||||
@@ -125,4 +123,4 @@ null
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/recording-screen/start-recording-screen.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L371)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L381)
|
||||
|
||||
@@ -107,4 +107,4 @@ Base64 encoded string. If remote_path is set, the response is empty string. (`st
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/recording-screen/stop-recording-screen.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L374)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L384)
|
||||
|
||||
@@ -49,6 +49,8 @@ toggle_touch_id_enrollment
|
||||
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.
|
||||
|
||||
Another way to enable touch id is by using `mobile: enrollBiometric`. More info [here](https://github.com/appium/appium-xcuitest-driver#mobile-enrollbiometric).
|
||||
|
||||
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
|
||||
|
||||
|
||||
@@ -111,4 +113,4 @@ null
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/simulator/toggle-touch-id-enrollment.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L545)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L555)
|
||||
|
||||
@@ -123,5 +123,5 @@ null
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/simulator/touch-id.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L542)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L552)
|
||||
* [Appium Docs](https://github.com/appium/appium-xcuitest-driver/blob/master/docs/touch-id.md)
|
||||
|
||||
@@ -97,4 +97,4 @@ The device density(dpi) of the Android device (`number`)
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/system/display-density.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L539)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L549)
|
||||
|
||||
@@ -101,4 +101,4 @@ null
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/system/open-notifications.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L523)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L533)
|
||||
|
||||
@@ -99,4 +99,4 @@ Information about visibility and bounds of status and navigation bar (`array<obj
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/system/system-bars.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L536)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L546)
|
||||
|
||||
@@ -104,4 +104,4 @@ Time on the device (`string`)
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/system/system-time.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L358)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L368)
|
||||
|
||||
@@ -100,4 +100,4 @@ The tag name of the element (`string`)
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/element/attributes/page-index.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L339)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L349)
|
||||
|
||||
@@ -113,4 +113,4 @@ null
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/element/attributes/replace-value.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L577)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L587)
|
||||
|
||||
@@ -14,7 +14,7 @@ List<MobileElement> elementsTwo = (List<MobileElement>) driver.findElementsByCla
|
||||
|
||||
```python
|
||||
# Python
|
||||
el = self.driver.find_elements_by_accessibility_id('SomeAccessibilityID')
|
||||
el = driver.find_element(AppiumBy.ACCESSIBILITY_ID,'SomeAccessibilityID')
|
||||
|
||||
```
|
||||
|
||||
|
||||
@@ -52,12 +52,12 @@ IWebElement currentElement = driver.SwitchTo().ActiveElement();
|
||||
|
||||
|Platform|Driver|Platform Versions|Appium Version|Driver Version|
|
||||
|--------|----------------|------|--------------|--------------|
|
||||
| iOS | [XCUITest](/docs/en/drivers/ios-xcuitest.md) | None | None | None |
|
||||
| iOS | [XCUITest](/docs/en/drivers/ios-xcuitest.md) | 9.3+ | 1.6.0+ | All |
|
||||
| | [UIAutomation](/docs/en/drivers/ios-uiautomation.md) | None | None | None |
|
||||
| Android | [UiAutomator2](/docs/en/drivers/android-uiautomator2.md) | None | None | None |
|
||||
| | [Espresso](/docs/en/drivers/android-espresso.md) | None | None | None |
|
||||
| Android | [UiAutomator2](/docs/en/drivers/android-uiautomator2.md) | ?+ | 1.6.0+ | All |
|
||||
| | [Espresso](/docs/en/drivers/android-espresso.md) | ?+ | 1.9.0+ | All |
|
||||
| | [UiAutomator](/docs/en/drivers/android-uiautomator.md) | None | None | None |
|
||||
| Mac | [Mac](/docs/en/drivers/mac.md) | None | None | None |
|
||||
| Mac | [Mac](/docs/en/drivers/mac.md) | ?+ | 1.6.4+ | All |
|
||||
| Windows | [Windows](/docs/en/drivers/windows.md) | None | None | None |
|
||||
|
||||
|
||||
|
||||
@@ -101,14 +101,14 @@ action.click(el).pause(keyboard).pause(keyboard).pause(keyboard).send_keys('keys
|
||||
# Build multiple action chains
|
||||
# Example: expressing a 1-second pinch-and-zoom
|
||||
# with a 500ms wait after the fingers first touch:
|
||||
f1 = action.add_pointer_input(:touch, 'finger1')
|
||||
f1 = ::Selenium::WebDriver::Interactions.pointer(:touch, name: 'finger1')
|
||||
f1.create_pointer_move(duration: 1, x: 200, y: 500, origin: ::Selenium::WebDriver::Interactions::PointerMove::VIEWPORT)
|
||||
f1.create_pointer_down(:left)
|
||||
f1.create_pause(0.5)
|
||||
f1.create_pointer_move(duration: 1, x: 200, y: 200, origin: ::Selenium::WebDriver::Interactions::PointerMove::VIEWPORT)
|
||||
f1.create_pointer_up(:left)
|
||||
|
||||
f2 = action.add_pointer_input(:touch, 'finger2')
|
||||
f2 = ::Selenium::WebDriver::Interactions.pointer(:touch, name: 'finger2')
|
||||
f2.create_pointer_move(duration: 1, x: 200, y: 500, origin: ::Selenium::WebDriver::Interactions::PointerMove::VIEWPORT)
|
||||
f2.create_pointer_down(:left)
|
||||
f2.create_pause(0.5)
|
||||
@@ -128,14 +128,14 @@ el = @driver.find_element(id: "some_id")
|
||||
# Build multiple action chains
|
||||
# Example: expressing a 1-second pinch-and-zoom
|
||||
# with a 500ms wait after the fingers first touch:
|
||||
f1 = @driver.action.add_pointer_input(:touch, 'finger1')
|
||||
f1 = ::Selenium::WebDriver::Interactions.pointer(:touch, name: 'finger1')
|
||||
f1.create_pointer_move(duration: 1, x: 200, y: 500, origin: ::Selenium::WebDriver::Interactions::PointerMove::VIEWPORT)
|
||||
f1.create_pointer_down(:left)
|
||||
f1.create_pause(0.5)
|
||||
f1.create_pointer_move(duration: 1, x: 200, y: 200, origin: ::Selenium::WebDriver::Interactions::PointerMove::VIEWPORT)
|
||||
f1.create_pointer_up(:left)
|
||||
|
||||
f2 = @driver.action.add_pointer_input(:touch, 'finger2')
|
||||
f2 = ::Selenium::WebDriver::Interactions.pointer(:touch, name: 'finger2')
|
||||
f2.create_pointer_move(duration: 1, x: 200, y: 500, origin: ::Selenium::WebDriver::Interactions::PointerMove::VIEWPORT)
|
||||
f2.create_pointer_down(:left)
|
||||
f2.create_pause(0.5)
|
||||
|
||||
@@ -77,6 +77,11 @@ multi_touch.down(element).move_to(10, 100).up(50, 50).perform
|
||||
|
||||
```
|
||||
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/interactions/touch/multi-touch-perform.yml)
|
||||
## Description
|
||||
|
||||
Deprecated. Please consider using [W3C Actions](/docs/en/commands/interactions/actions.md)
|
||||
|
||||
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/interactions/touch/multi-touch-perform.yml)
|
||||
## Support
|
||||
@@ -142,4 +147,4 @@ null
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/interactions/touch/multi-touch-perform.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L349)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L359)
|
||||
|
||||
@@ -32,6 +32,7 @@ actions.perform()
|
||||
// webdriver.io example
|
||||
driver.touchPerform([
|
||||
{ action: 'press', options: { x: 100, y: 250 }},
|
||||
{ action: 'wait', options: { ms: 100 }},
|
||||
{ action: 'moveTo', options: { x: 300, y: 100 }},
|
||||
{ action: 'release' }
|
||||
]);
|
||||
@@ -68,7 +69,9 @@ action.Perform();
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/interactions/touch/touch-perform.yml)
|
||||
## Description
|
||||
|
||||
This functionality is only available from within a native context
|
||||
Deprecated. Please consider using [W3C Actions](/docs/en/commands/interactions/actions.md).
|
||||
|
||||
This functionality is only available from within a native context.
|
||||
|
||||
'Touch Perform' works similarly to the other singular touch interactions, except that this allows you to chain together more than one touch action as one
|
||||
command. This is useful because Appium commands are sent over the network and there's latency between commands. This latency can make certain touch
|
||||
@@ -140,4 +143,4 @@ null
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/interactions/touch/touch-perform.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L346)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L356)
|
||||
|
||||
@@ -106,5 +106,5 @@ A JSON hash of events like `{'commands' => [{'cmd' => 123455, ....}], 'startTime
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/session/events/get-events.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L598)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L608)
|
||||
* [add ability to retrieve log events as a new api route](https://github.com/appium/appium-base-driver/pull/365)
|
||||
|
||||
@@ -114,5 +114,5 @@ null
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/session/events/log-event.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L601)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L611)
|
||||
* [add new route to allow logging of custom events](https://github.com/appium/appium-base-driver/pull/364)
|
||||
|
||||
@@ -102,4 +102,4 @@ a JSON hash of all the currently specified settings, see [Settings API](/docs/en
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/session/settings/get-settings.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L588)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L598)
|
||||
|
||||
@@ -108,4 +108,4 @@ null
|
||||
[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/session/settings/update-settings.yml)
|
||||
## See Also
|
||||
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L588)
|
||||
* [JSONWP Specification](https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js#L598)
|
||||
|
||||
@@ -111,7 +111,7 @@ npm run reinstall
|
||||
|
||||
Appium is made up of a number of different packages. As of v2.0, the core packages
|
||||
live in a [_monorepo_](https://github.com/appium/appium) (including this documentation).
|
||||
The packages themselves live in the `packages` subdirectory. Running `npm install`
|
||||
The packages themselves live in the `packages` subdirectory. Running `npm install`
|
||||
will automatically install all dependencies for all packages in this directory by way of
|
||||
[Lerna](https://lerna.js.org).
|
||||
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
- node binary check
|
||||
|
||||
## appium-gulp-plugins
|
||||
- dev package with custom plugins used accross appium modules (for Appium development only)
|
||||
- dev package with custom plugins used across appium modules (for Appium development only)
|
||||
- contains task for
|
||||
- e2e and unit tests (with coverage reporting)
|
||||
- transpiling ES2016 into ES5
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
This document explains how to release a new version of one or more packages in [this monorepo](https://github.com/appium/appium).
|
||||
|
||||
Note: the shell commands herein expect `lerna` in your `PATH`; you can also use `npx lerna`.
|
||||
Note: the shell commands herein expect `lerna` in your `PATH`; you can also use `npx lerna`.
|
||||
|
||||
> See the [`lerna publish`](https://github.com/lerna/lerna/tree/main/commands/publish) docs for more info.
|
||||
|
||||
@@ -57,7 +57,7 @@ If you are happy with what it's going to do, confirm with `y` and continue to bu
|
||||
|
||||
**This is not recommended.** Lerna relies heavily on Git tags to do its thing, and a mistake would be costly. It is only _possible_ because we use independent versioning.
|
||||
|
||||
1. Navigate to a package directory and call `npm version --no-git-tag-version <newversion>`.
|
||||
1. Navigate to a package directory and call `npm version --no-git-tag-version <newversion>`.
|
||||
1. You **must** tag the version manually using the format `[@scope/]<package-name>@<new-version>`.
|
||||
1. Push the new changeset and tag to GitHub.
|
||||
1. Issue `npm publish` from this package directory.
|
||||
|
||||
@@ -20,6 +20,7 @@ In addition to Appium's general requirements:
|
||||
|
||||
* Java 8 installed and configured correctly for your platform
|
||||
* Mac, Windows, or Linux OS with the ability to run the Android SDK
|
||||
* The minimum required Android SDK Build Tools version is 24
|
||||
|
||||
### Usage
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ In addition to Appium's general requirements:
|
||||
|
||||
* Java 8 installed and configured correctly for your platform
|
||||
* Mac, Windows, or Linux OS with the ability to run the Android SDK
|
||||
* The minimum required Android SDK Build Tools version is 24
|
||||
|
||||
Further, the UiAutomator2 driver does not support Android versions below 5.0
|
||||
(Lollipop, API level 21). If you are automating such versions, consider using
|
||||
|
||||
@@ -130,10 +130,12 @@ installed, and is _not_ recommended):
|
||||
```
|
||||
* Given this installation location, `/path/where/installed/bin/appium`, `WebDriverAgent` project
|
||||
will be found in `/path/where/installed/lib/node_modules/appium/node_modules/appium-webdriveragent`.
|
||||
Open a terminal and go to that location, then run the following in order to
|
||||
set the project up:
|
||||
Open a terminal and go to the location, then run the next script.
|
||||
```
|
||||
mkdir -p Resources/WebDriverAgent.bundle
|
||||
```
|
||||
* (Only for Appium versions below 1.20) Run the next script on the same terminal.
|
||||
```
|
||||
./Scripts/bootstrap.sh -d
|
||||
```
|
||||
* Open `WebDriverAgent.xcodeproj` in Xcode. For **both** the `WebDriverAgentLib`
|
||||
@@ -173,6 +175,9 @@ If this was successful, the output should end with something like:
|
||||
t = 0.00s Start Test at 2017-01-23 15:49:12.588
|
||||
t = 0.00s Set Up
|
||||
```
|
||||
If the command fails, try passing the `-allowProvisioningUpdates` flag like this (see [#16212](https://github.com/appium/appium/issues/16212)):
|
||||
```bash
|
||||
xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=<udid>' -allowProvisioningUpdates test
|
||||
* To completely verify, you can try accessing the WebDriverAgent server status
|
||||
(**note:** you _must_ be on the same network as the device, and know its IP
|
||||
address, from Settings => Wi-Fi => Current Network):
|
||||
@@ -226,8 +231,7 @@ information about this in the [Apple documentation](https://developer.apple.com/
|
||||
* A Mac with [Xcode](https://developer.apple.com/xcode/) and the Xcode Command
|
||||
Line Developer Tools.
|
||||
|
||||
Appium handles installing the application to the device, using
|
||||
`ideviceinstaller` (which is installed as part of `libimobiledevice`), but it
|
||||
Appium handles installing the application to the device, using `ideviceinstaller` (which is installed as part of `libimobiledevice`), but it
|
||||
is sometimes easier to pre-install your app using Xcode to ensure there are no
|
||||
problems (see again the [Apple
|
||||
documentation](https://developer.apple.com/library/content/documentation/IDEs/Conceptual/AppDistributionGuide/TestingYouriOSApp/TestingYouriOSApp.html)
|
||||
@@ -243,7 +247,15 @@ for this).
|
||||
1. Settings -> Safari -> Advanced -> **Web Inspector** and **Remote Automation**
|
||||
1. Please read [Automating mobile web apps](/writing-running-appium/web/mobile-web) for more details about WebView
|
||||
1. Consider generating a provisioning profile with `.xctrunner` identifier if you do not want to generate a wildcard one for manual configuration. The `.xctrunner` config support has been added since Xcode 11. [A reference](https://github.com/appium/appium/issues/13610)
|
||||
1. Make sure the device under test is not a jaibroken one
|
||||
- `com.apple.mobile.installation_proxy` service to manage Apps on the device [does not work](https://github.com/appium/appium-desktop/issues/1447)
|
||||
1. Make sure the provisioning profile has [_iOS Distribution_ certificate](https://developer.apple.com/support/certificates/)
|
||||
- An active Xcode/xcodebuild connection/session is necessary to interact with WebDriverAgentRunner because of Apple's security design. The certificate affects the limitation ([issue](https://github.com/appium/appium/issues/14577#issuecomment-660997827))
|
||||
1. Make sure the keyboard preference in the device under test is Apple official one and the input language is set to English to send texts to `XCUIElementTypeSecureTextField`
|
||||
- Non-official or non-English keyboards may not be able to send keys to `XCUIElementTypeSecureTextField`. e.g. [issues#15647](https://github.com/appium/appium/issues/15647)
|
||||
|
||||
### Notice
|
||||
|
||||
The Appium team does not support the `xcuitest` driver running against jailbroken devices.
|
||||
|
||||
e.g., [`com.apple.mobile.installation_proxy` service error to manage Apps on the device](https://github.com/appium/appium-desktop/issues/1447)
|
||||
|
||||
Please use it at your own risk.
|
||||
|
||||
@@ -138,9 +138,18 @@ $HOME/Library/Developer/Xcode/DerivedData/*
|
||||
```
|
||||
|
||||
### Configure keyboards
|
||||
Over Appium 1.14.0, Appium configures keyboard preferences by default to make test running more stable. You can change sone of them via settings API.
|
||||
In Appium v1.14.0 or newer, Appium configures keyboard preferences by default to make test running more stable. You can change some of them via settings API.
|
||||
|
||||
- Turn `Auto-Correction` in _Keyboards_ off
|
||||
- Turn `Predictive` in _Keyboards_ off
|
||||
- Mark keyboard tutorial as complete
|
||||
- (Only for Simulator) Toggle software keyboard on
|
||||
|
||||
### Accessibility preferences fine-tuning
|
||||
|
||||
In some cases, enabling of the below preferences helps to make some view elements accessible.
|
||||
Appium does not modify these settings automatically, since they could affect the way your application under test performs.
|
||||
Please change them manually if needed.
|
||||
|
||||
- Turn `Spoken Content` in _Settings > Accessibility_ on
|
||||
- Turn `Speak Selection` in _Settings > Accessibility_ on
|
||||
|
||||
@@ -13,6 +13,7 @@ Appium needs to know package and activity names in order to properly initialize
|
||||
- `appWaitActivity`: The name of the application activity to wait for/which starts the first
|
||||
- `appWaitPackage`: The id of the application package to wait for/which starts the first
|
||||
- `appWaitDuration`: The maximum duration to wait until the `appWaitActivity` is focused in milliseconds (20000 by default)
|
||||
- `appWaitForLaunch`: Whether to wait until Activity Manager returns the control to the calling process. By default the driver always waits until `appWaitDuration` is expired. Setting this capability to `false` effectively cancels this wait and unblocks the server loop as soon as `am` successfully triggers the command to start the activity.
|
||||
|
||||
All these capabilities are optional. If they are not set explicitly then Appium tries to auto detect them by reading their values from the APK manifest. Although, if the application under test is supposed to be already installed on the device (`noReset=true`) then at least `appActivity` and `appPackage` options are required to be set, since no package manifest is available in such case. If you don't set `appWaitPackage` and `appWaitActivity` explicitly then these are getting assigned to `appPackage`/`appActivity` values automatically. For more details check on the implementation of `packageAndLaunchActivityFromManifest` method in the [appium-adb](https://github.com/appium/appium-adb/blob/master/lib/tools/android-manifest.js) package.
|
||||
|
||||
@@ -32,4 +33,8 @@ The full error description usually looks like `'java.lang.SecurityException: Per
|
||||
|
||||
Thus exception usually indicates, that the first application activity is not the same package/activity, as it is set (or auto detected) by `appWaitPackage`/`appWaitActivity`. Such error normally happens in applications having multiple activities. In order to resolve the problem one should check with application developer regarding which activity/package is the very first one that appears on application startup. The currently focused activity name might be verified using the `adb shell dumpsys window windows` command mentioned above. Also, Appium allows to use wildcards while setting `appWaitActivity` value. This might be particularly useful if the activity name is generated dynamically or it is not the same all the time. For example `com.mycomany.*` will match any of `com.mycomany.foo`, `com.mycomany.bar`.
|
||||
|
||||
#### Command '…' timed out after X ms
|
||||
|
||||
If you've double checked that activity names are correct, but the startup still times out, then try to increase the value of `appWaitDuration` capability. Normally, the default 20 seconds is enough for the most of applications, however, some bigger apps might require more time to start and show the first activity. Please, don't create such apps.
|
||||
|
||||
There might be also situations where an activity does not return the control to the calling process at all, so `am start` call blocks forever independently of the value of `appWaitDuration`, thus causing the timeout. In such case setting `appWaitForLaunch` to `false` might help to resolve the issue. Although, by choosing this option, the driver cannot make sure the activity has fully started, so then it is up to the client code to verify the initial UI state is the one that is expected.
|
||||
|
||||
@@ -9,6 +9,7 @@ We can get distributed apk files from the `.aab` file via the CLI. Using the gen
|
||||
|
||||
1. Export `bundletool.jar` in your path
|
||||
- Appium looks for `bundletool.jar` in your local environemnt. Make sure you can find the path with `which 'bundletool.jar'`. If you can't find it, please set the path correctly.
|
||||
- Please make sure the bundletool version is above 1.6.0
|
||||
2. Generate the `.apks` file from the `.aab` file
|
||||
- The `.aab` is available over Android Studio 3.2
|
||||
- You must sign correctly when you generate `.apks` from `.aab`. This step requires data signing.
|
||||
|
||||
@@ -37,6 +37,69 @@ driver.execute_script('mobile: longClickGesture', {'x': 100, 'y': 100, 'duration
|
||||
```
|
||||
|
||||
|
||||
### mobile: doubleClickGesture
|
||||
|
||||
This gesture performs double click action on the given element/coordinates.
|
||||
Available since Appium v1.21
|
||||
|
||||
#### Supported arguments
|
||||
|
||||
* _elementId_: The id of the element to be clicked.
|
||||
If the element is missing then both click offset coordinates must be provided.
|
||||
If both the element id and offset are provided then the coordinates
|
||||
are parsed as relative offsets from the top left corner of the element.
|
||||
* _x_: The x-offset coordinate
|
||||
* _y_: The y-offset coordinate
|
||||
|
||||
#### Usage examples
|
||||
|
||||
```java
|
||||
// Java
|
||||
((JavascriptExecutor) driver).executeScript("mobile: doubleClickGesture", ImmutableMap.of(
|
||||
"elementId", ((RemoteWebElement) element).getId()
|
||||
));
|
||||
```
|
||||
|
||||
```python
|
||||
# Python
|
||||
driver.execute_script('mobile: doubleClickGesture', {'x': 100, 'y': 100})
|
||||
```
|
||||
|
||||
|
||||
### mobile: clickGesture
|
||||
|
||||
This gesture performs click action on the given element/coordinates.
|
||||
Available since Appium UiAutomator2 driver 1.71.0. Usage of this gesture is recommended
|
||||
as a possible workaround for cases where the "native" tap call fails,
|
||||
even though tap coordinates seem correct. This issue is related to the fact
|
||||
these calls use the legacy UIAutomator-based calls while this extension
|
||||
is based on the same foundation as W3C does.
|
||||
|
||||
|
||||
#### Supported arguments
|
||||
|
||||
* _elementId_: The id of the element to be clicked.
|
||||
If the element is missing then both click offset coordinates must be provided.
|
||||
If both the element id and offset are provided then the coordinates
|
||||
are parsed as relative offsets from the top left corner of the element.
|
||||
* _x_: The x-offset coordinate
|
||||
* _y_: The y-offset coordinate
|
||||
|
||||
#### Usage examples
|
||||
|
||||
```java
|
||||
// Java
|
||||
driver.executeScript("mobile: clickGesture", ImmutableMap.of(
|
||||
"elementId", ((RemoteWebElement) element).getId()
|
||||
));
|
||||
```
|
||||
|
||||
```python
|
||||
# Python
|
||||
driver.execute_script('mobile: clickGesture', {'x': 100, 'y': 100})
|
||||
```
|
||||
|
||||
|
||||
### mobile: dragGesture
|
||||
|
||||
This gesture performs drag action from the given element/coordinates to the given point.
|
||||
|
||||
@@ -34,4 +34,11 @@ result = driver.execute_script('mobile: shell', {
|
||||
'timeout': 5000
|
||||
})
|
||||
assert result['stdout'] == 'arg1 arg2'
|
||||
```
|
||||
```
|
||||
|
||||
```js
|
||||
// Javascript
|
||||
const output = driver.executeScript('mobile: shell', [{
|
||||
command: 'ls',
|
||||
args: ['/sdcard'],
|
||||
}]);
|
||||
|
||||
@@ -41,7 +41,7 @@ These Capabilities span multiple drivers.
|
||||
|`automationName`|Which automation engine to use|`Appium` (default), or `UiAutomator2`, `Espresso`, or `UiAutomator1` for Android, or `XCUITest` or `Instruments` for iOS, or `YouiEngine` for application built with You.i Engine|
|
||||
|`platformName`|Which mobile OS platform to use|`iOS`, `Android`, or `FirefoxOS`|
|
||||
|`platformVersion`|Mobile OS version|e.g., `7.1`, `4.4`|
|
||||
|`deviceName`|The kind of mobile device or emulator to use|`iPhone Simulator`, `iPad Simulator`, `iPhone Retina 4-inch`, `Android Emulator`, `Galaxy S4`, etc.... On iOS, this should be one of the valid devices returned by instruments with `instruments -s devices`. On Android this capability is currently ignored, though it remains required.|
|
||||
|`deviceName`|The kind of mobile device or emulator to use|`iPhone Simulator`, `iPad Simulator`, `iPhone Retina 4-inch`, `Android Emulator`, `Galaxy S4`, etc.... On iOS, this should be one of the valid devices returned by instruments with `instruments -s devices` or xctrace with `xcrun xctrace list devices` (since Xcode 12). On Android this capability is currently ignored, though it remains required.|
|
||||
|`app`|The absolute local path _or_ remote http URL to a `.ipa` file (IOS), `.app` folder (IOS Simulator), `.apk` file (Android) or `.apks` file (Android App Bundle), or a `.zip` file containing one of these. Appium will attempt to install this app binary on the appropriate device first. Note that this capability is not required for Android if you specify `appPackage` and `appActivity` capabilities (see below). `UiAutomator2` and `XCUITest` allow to start the session without `app` or `appPackage`. Incompatible with `browserName`. See [here](/docs/en/writing-running-appium/android/android-appbundle.md) about `.apks` file.|`/abs/path/to/my.apk` or `http://myapp.com/app.ipa`|
|
||||
|`otherApps`|App or list of apps (as a JSON array) to install prior to running tests. Note that it will not work with `automationName` of `Espresso` and iOS real devices|e.g., `"/path/to/app.apk"`, `https://www.example.com/url/to/app.apk`, `["http://appium.github.io/appium/assets/TestApp9.4.app.zip", "/path/to/app-b.app"]`|
|
||||
|`browserName`|Name of mobile web browser to automate. Should be an empty string if automating an app instead.|'Safari' for iOS and 'Chrome', 'Chromium', or 'Browser' for Android|
|
||||
@@ -58,16 +58,17 @@ These Capabilities span multiple drivers.
|
||||
|`printPageSourceOnFindFailure`| When a find operation fails, print the current page source. Defaults to `false`.|e.g., `true`|
|
||||
|`clearSystemFiles`| Delete any generated files at the end of a session. Default to `false`. | `true`, `false`|
|
||||
|
||||
- [Update settings](#update-settings)
|
||||
#### Update settings
|
||||
|
||||
|Capability|Description|Values|
|
||||
|----|-----------|-------|
|
||||
|`settings[settingsKey]`| Update [Appium Settings](https://github.com/appium/appium/blob/master/docs/en/advanced-concepts/settings.md) on session creation. |e.g., `'settings[mjpegScalingFactor]': 10`, `'settings[shouldUseCompactResponses]': true`|
|
||||
|
||||
### Android Only
|
||||
### Android
|
||||
|
||||
These Capabilities are available only on Android-based drivers (like
|
||||
[UiAutomator2](/docs/en/drivers/android-uiautomator2.md) for example).
|
||||
#### UIAutomator1
|
||||
|
||||
These Capabilities are available for UiAutomator1 driver. The driver is for Android 5 and lower.
|
||||
|
||||
|Capability|Description|Values|
|
||||
|----|-----------|-------|
|
||||
@@ -139,93 +140,20 @@ These Capabilities are available only on Android-based drivers (like
|
||||
| `ignoreHiddenApiPolicyError` | Ignores `Security exception: Permission denial` alert and allows to continue the session creation process since Appium 1.18.0+. The error happens when Appium tries to relax [hidden API policy](https://developer.android.com/distribute/best-practices/develop/restrictions-non-sdk-interfaces#how_can_i_enable_access_to_non-sdk_interfaces), although some devices with a customized firmware deny such requests. Defaults to `false`. | `true`, `false` |
|
||||
| `mockLocationApp` | Sets the package identifier of the app, which is used as a system mock location provider since Appium 1.18.0+. This capability has no effect on emulators. If the value is set to `null` or an empty string, then Appium will skip the mocked location provider setup procedure. Defaults to Appium Setting package identifier (`io.appium.settings`). | e.g., `null`, `io.appium.settings`, `example.your.app` |
|
||||
| logcatFormat | Set the output format for logcat messages since Appium 1.18.0. Supported formats are listed in [here](https://github.com/appium/appium-adb/blob/master/lib/logcat.js). Please read [logcat#outputFormat](https://developer.android.com/studio/command-line/logcat#outputFormat) for more details about each format. Defaults to `threadtime`. | e.g., `process`|
|
||||
| logcatFilterSpecs | Set the output filter rule for logcat messages since Appium 1.18.0. Please read [logcat#filteringOutput](https://developer.android.com/studio/command-line/logcat#filteringOutput) for more details about the rule. [Write and View Logs with Logcat](https://developer.android.com/studio/debug/am-logcat) is also helpful. | e.g., `['*:W', 'MyActivity:D']` (`MyActivity` is a tag)|
|
||||
| allowDelayAdb | Whether enable `-delay-adb` on emulator startup. Defaults to `true` | `true`, `false` |
|
||||
|
||||
#### UIAutomator (1 & 2)
|
||||
|
||||
These Capabilities are available on UIA 1 and 2
|
||||
|
||||
|Capability|Description|Values|
|
||||
|----|-----------|-------|
|
||||
| `logcatFilterSpecs` | Set the output filter rule for logcat messages since Appium 1.18.0. Please read [logcat#filteringOutput](https://developer.android.com/studio/command-line/logcat#filteringOutput) for more details about the rule. [Write and View Logs with Logcat](https://developer.android.com/studio/debug/am-logcat) is also helpful. | e.g., `['*:W', 'MyActivity:D']` (`MyActivity` is a tag)|
|
||||
| `allowDelayAdb` | Whether enable `-delay-adb` on emulator startup. Defaults to `true` | `true`, `false` |
|
||||
|`intentAction`| Intent action which will be used to start activity (default `android.intent.action.MAIN`)| e.g.`android.intent.action.MAIN`, `android.intent.action.VIEW`|
|
||||
|`intentCategory`| Intent category which will be used to start activity (default `android.intent.category.LAUNCHER`)| e.g. `android.intent.category.LAUNCHER`, `android.intent.category.APP_CONTACTS`
|
||||
|`intentFlags`| Flags that will be used to start activity (default `0x10200000`)| e.g. `0x10200000`
|
||||
|`optionalIntentArguments`| Additional intent arguments that will be used to start activity. See [Intent arguments](http://developer.android.com/reference/android/content/Intent.html) | e.g. `--esn <EXTRA_KEY>`, `--ez <EXTRA_KEY> <EXTRA_BOOLEAN_VALUE>`, etc.
|
||||
|
||||
#### UIAutomator2 Only
|
||||
#### UIAutomator2
|
||||
|
||||
These Capabilities are available only on the [UiAutomator2 Driver](/docs/en/drivers/android-uiautomator2.md)
|
||||
Please refer to the documentation on the UIAutomator2 driver [repository](https://github.com/appium/appium-uiautomator2-driver#capabilities) about its available capabilities.
|
||||
|
||||
|Capability|Description|Values|
|
||||
|----|-----------|-------|
|
||||
|`appWaitForLaunch`| Tries to launch the app under test without [-W](https://developer.android.com/studio/command-line/adb#am) option in session creation. It might help when the session creation does not proceed since `shell am start` does not respond. Defaults to `true`. | `false` or `true` |
|
||||
|`disableSuppressAccessibilityService`| Set [FLAG_DONT_SUPPRESS_ACCESSIBILITY_SERVICES](https://developer.android.com/reference/android/app/UiAutomation#FLAG_DONT_SUPPRESS_ACCESSIBILITY_SERVICES) to allow existing accessibility service continue to run, and a new one may start for Appium. It helps to test the app under test which has accessibility feature such as TalkBack. Appium will not specify the flag if nothing is provided. The flag requires Android API Level 24+. | `false` or `true` |
|
||||
|`mjpegServerPort`| If specified this is the local port that will be bound to the `appium-uiautomator2-server`'s MJPEG screenshot stream. This can be used in conjunction with `mjpegScreenshotUrl`. It should be a valid integer in range _1025..65535_. Defaults to `null`. e.g. `mjpegScreenshotUrl = 'http://localhost:9200', mjpegServerPort = 9200`| any `Integer`, recommended: `9200..9299` for consistency w/ `serverPort` range |
|
||||
|`skipServerInstallation`| Skip uiAutomator2 server installation and use uiAutomator2 server from the device. Can be used to improve startup performance when an uiAutomator2 server in proper version is already installed on the device. Defaults to `false`. | `false` or `true` |
|
||||
|`uiautomator2ServerInstallTimeout`| Timeout in milliseconds used to wait for an uiAutomator2 server to be installed. Defaults to `20000` |e.g., `20000`|
|
||||
|`uiautomator2ServerLaunchTimeout`| Timeout in milliseconds used to wait for an uiAutomator2 server to launch. Defaults to `20000` |e.g., `20000`|
|
||||
|`userProfile`| Enforce user profile as the given parameter if the value was provided. It should be an integer. | e.g., `11` |
|
||||
#### Espresso
|
||||
|
||||
#### Espresso Only
|
||||
|
||||
These Capabilities are available only on the [Espresso Driver](/docs/en/drivers/android-espresso.md)
|
||||
|
||||
|Capability|Description|Values|
|
||||
|----|-----------|-------|
|
||||
|`espressoServerLaunchTimeout`|Timeout in milliseconds used to wait for the Espresso server to launch. Defaults to `30000` |e.g., `50000`|
|
||||
|`espressoBuildConfig`|Path to the Espresso server build configuration JSON (see below) or a stringified JSON itself (only supported since server version 1.19)|e.g., `/projects/myapp-tests/buildconfig.json`|
|
||||
|`showGradleLog`|Whether to pipe Gradle build log for the Espresso server to the Appium log. Defaults to `false`|e.g., `true`|
|
||||
|`skipServerInstallation`|Skip Espresso server build and apk installation. This option could break proper Espresso server setup for the particular Appium version, but it can improve startup performance when the proper Espresso server and the proper app under test are already installed on the device. Please, make sure not to enable this option if the Espresso server or the application under test needs an update. Defaults to `false` | `true` or `false`|
|
||||
|`intentOptions`|Intent options which will be used to start the application under test. It can set intent options such as `action`, `categories` and `component` as JSON format. Please read [#538](https://github.com/appium/appium-espresso-driver/issues/538) as an example usage. | e.g. `{"action": "android.intent.action.MAIN", "categories": "android.intent.category.LAUNCHER", "component": "com.appium/.launcher.MainActivity"` |
|
||||
|`disableSuppressAccessibilityService`| Set [FLAG_DONT_SUPPRESS_ACCESSIBILITY_SERVICES](https://developer.android.com/reference/android/app/UiAutomation#FLAG_DONT_SUPPRESS_ACCESSIBILITY_SERVICES) to allow existing accessibility service continue to run, and a new one may start for Appium. It helps to test the app under test which has accessibility feature such as TalkBack. Appium will not specify the flag if nothing is provided. The flag requires Android API Level 24+. | `true`, `false` |
|
||||
|`appLocale`| Set [Locale](https://developer.android.com/reference/java/util/Locale) for [the target context](https://developer.android.com/reference/androidx/test/core/app/ApplicationProvider#getApplicationContext()) since Appium 1.18.0. `language`, `country` and `variant` are available as same as the Locale class. `language` is mandatory. Please check the [locale page](https://developer.android.com/reference/java/util/Locale) for more details. Setting `appLocale` only affects the locale of the application under test and does not influence other system views, such as the status bar. Consider setting `language`, `locale` and/or `localeScript` capabilities if you would like to change the locale for the entire the system. | e.g., `{"language": "ja", "country": "JP"}` |
|
||||
|
||||
|
||||
##### Espresso server build configuration JSON
|
||||
Passing this configuration file using `espressoBuildConfig` desired capability allows to fine-tune the build process of the Espresso server. It is mostly useful in cases where the default Espresso server settings are not compatible with your application under test.
|
||||
One example of such a case is tests crashing due to `Resource <name> is not a Drawable` error (see https://github.com/appium/appium-espresso-driver/issues/449 for discussion).
|
||||
|
||||
Configuration example:
|
||||
```json
|
||||
{
|
||||
"toolsVersions": {
|
||||
"gradle": "5.1.1",
|
||||
"androidGradlePlugin": "3.4.2",
|
||||
"compileSdk": 28,
|
||||
"buildTools": "28.0.3",
|
||||
"minSdk": 18,
|
||||
"targetSdk": 28,
|
||||
"kotlin": "1.3.31"
|
||||
},
|
||||
"additionalAppDependencies": [
|
||||
"com.google.android.material:material:1.0.0"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
***Version settings***
|
||||
|
||||
`toolsVersion` specifies versions of various tools and SDKs used during the building process of the Espresso server. Default versions are the versions used to build the Espresso driver without build configuration JSON.
|
||||
|
||||
The module versions enumerated under `toolsVersion` are only used to build the server APK. They don't affect the manifest of your application under test or the Espresso server manifest (that is still generated from the manifest of your application under test).
|
||||
|
||||
|Setting|Description|Values|
|
||||
|----|-----------|-------|
|
||||
|`gradle`|Gradle version|e.g.,`5.1.1`|
|
||||
|`androidGradlePlugin`|Android Gradle Plugin version|e.g., `3.4.2`|
|
||||
|`buildTools`|Version of the Android SDK build tools that should be used to compile the Espresso server (corresponds to `buildToolsVersion` in Gradle build files)|e.g., `28.0.3`|
|
||||
|`compileSdk`|Android API level that should be used to compile the Espresso server (corresponds to `compileSdkVersion` in Gradle build files)|e.g., `28`|
|
||||
|`minSdk`|Minimum Android API level required to run the application under tests, affects compatibility libraries used to build the Espresso server (corresponds to `minSdk` in Gradle build files)|e.g., `18`|
|
||||
|`targetSdk`|Android API level used to test the app (corresponds to `targetSdk` in Gradle build files)|e.g., `28`|
|
||||
|`kotlin`|Version of Kotlin compiler and official libraries|e.g., `1.3.311`|
|
||||
|
||||
***Application dependencies***
|
||||
|
||||
`additionalAppDependencies` and `additionalAndroidTestDependencies` array specify additional dependencies of the application under test that build tools should know about when building the Espresso server.
|
||||
For example: `"additionalAndroidTestDependencies": [ "com.google.android.material:material:1.0.0" ]`.
|
||||
|
||||
Items belonging to `additionalAppDependencies` array are translated to `implementation` lines in Gradle build files of the Espresso server. `additionalAndroidTestDependencies` are translated to `androidTestImplementation`.
|
||||
Please refer to the documentation on the Espresso driver [repository](https://github.com/appium/appium-espresso-driver#capabilities) about its available capabilities.
|
||||
|
||||
### iOS Only
|
||||
|
||||
@@ -237,7 +165,6 @@ Driver](/docs/en/drivers/ios-uiautomation.md).
|
||||
|----|-----------|-------|
|
||||
|`calendarFormat`| (Sim-only) Calendar format to set for the iOS Simulator|e.g. `gregorian`|
|
||||
|`bundleId`| Bundle ID of the app under test. Useful for starting an app on a real device or for using other caps which require the bundle ID during test startup. To run a test on a real device using the bundle ID, you may omit the 'app' capability, but you must provide 'udid'.|e.g. `io.appium.TestApp`|
|
||||
|`udid`| Unique device identifier of the connected physical device|e.g. `1ae203187fc012g`|
|
||||
|`launchTimeout`| Amount of time in ms to wait for instruments before assuming it hung and failing the session|e.g. `20000`|
|
||||
|`locationServicesEnabled`| (Sim-only) Force location services to be either on or off. Default is to keep current sim setting.|`true` or `false`|
|
||||
|`locationServicesAuthorized`| (Sim-only) Set location services to be authorized or not authorized for app via plist, so that location services alert doesn't pop up. Default is to keep current sim setting. Note that if you use this setting you MUST also use the `bundleId` capability to send in your app's bundle ID.|`true` or `false`|
|
||||
@@ -269,30 +196,32 @@ Driver](/docs/en/drivers/ios-uiautomation.md).
|
||||
|
||||
#### iOS Only, using XCUITest
|
||||
|
||||
(For XCUITest-specific capabilities, please refer to the documentation on the [XCUITest Driver repo](https://github.com/appium/appium-xcuitest-driver#desired-capabilities) itself.)
|
||||
Please refer to the documentation on the XCUITest driver [repository](https://github.com/appium/appium-xcuitest-driver#desired-capabilities) about its available capabilities.
|
||||
|
||||
### Safaridriver Only
|
||||
|
||||
(For safaridriver capabilities, please refer to the documentation on the [safaridriver repo](https://github.com/appium/appium-safari-driver) itself.)
|
||||
Please refer to the documentation on the safaridriver [repository](https://github.com/appium/appium-safari-driver) about its available capabilities.
|
||||
|
||||
### Geckodriver Only
|
||||
|
||||
(For geckodriver capabilities, please refer to the documentation on the [geckodriver repo](https://github.com/appium/appium-geckodriver) itself.)
|
||||
Please refer to the documentation on the geckodriver [repository](https://github.com/appium/appium-geckodriver) about its available capabilities.
|
||||
|
||||
### MacDriver Only
|
||||
|
||||
(For MacDriver capabilities, please refer to the documentation on the [Appium MacDriver repo](https://github.com/appium/appium-mac-driver#desired-capabilities) itself.)
|
||||
Please refer to the documentation on the MacDriver [repository](https://github.com/appium/appium-mac-driver#desired-capabilities) about its available capabilities.
|
||||
|
||||
### Mac2Driver Only
|
||||
|
||||
(For Mac2 Driver capabilities, please refer to the documentation on the [Appium Mac2Driver repo](https://github.com/appium/appium-mac2-driver#capabilities) itself.)
|
||||
Please refer to the documentation on the Mac2Driver [repository](https://github.com/appium/appium-mac2-driver#capabilities) about its available capabilities.
|
||||
|
||||
### You.i Engine Only
|
||||
|
||||
(For You.i Engine-specific capabilities, please refer to the documentation on the [You.i Engine driver](https://github.com/YOU-i-Labs/appium-youiengine-driver#desired-capabilities) itself.)
|
||||
Please refer to the documentation on the You.i Engine driver [repository](https://github.com/YOU-i-Labs/appium-youiengine-driver#desired-capabilities) about its available capabilities.
|
||||
|
||||
### WinAppDriver Only
|
||||
(For WinAppDriver specific capabilities, please refer to the documentation on the [Appium Windows Driver repo](https://github.com/appium/appium-windows-driver#windowsdriver-specific-capabilities) itself.)
|
||||
|
||||
Please refer to the documentation on the Appium Windows Driver [repository](https://github.com/appium/appium-windows-driver#windowsdriver-specific-capabilities) about its available capabilities.
|
||||
|
||||
### Flutter driver only
|
||||
(For FlutterDriver specific capabilities, examples please refer to the documentation on the [Flutter Driver repo](https://github.com/truongsinh/appium-flutter-driver#desired-capabilities-for-flutter-driver-only) itself.)
|
||||
|
||||
Please refer to the documentation on the Flutter Driver [repository](https://github.com/truongsinh/appium-flutter-driver#desired-capabilities-for-flutter-driver-only) about its available capabilities.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user