appium-mcp 1.19.0 → 1.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/server.json +2 -2
- package/src/resources/submodules/appium-uiautomator2-driver/CHANGELOG.md +220 -0
- package/src/resources/submodules/appium-uiautomator2-driver/README.md +169 -16
- package/src/resources/submodules/appium-uiautomator2-driver/docs/android-multiwindow.md +872 -0
- package/src/resources/submodules/appium-xcuitest-driver/CHANGELOG.md +363 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/guides/tvos.md +21 -2
- package/src/resources/submodules/appium-xcuitest-driver/docs/installation/index.md +1 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/reference/capabilities.md +2 -1
- package/src/resources/submodules/appium-xcuitest-driver/docs/reference/element-attributes.md +1 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/reference/env-vars.md +13 -0
- package/src/resources/submodules/appium-xcuitest-driver/docs/reference/execute-methods.md +6 -3
- package/src/resources/submodules/appium-xcuitest-driver/docs/reference/settings.md +2 -0
- package/src/resources/submodules/appium-xcuitest-driver/test/assets/TestApp-iphonesimulator.app/Default-568h@2x.png +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## [1.19.1](https://github.com/appium/appium-mcp/compare/v1.19.0...v1.19.1) (2026-02-23)
|
|
2
|
+
|
|
3
|
+
### Miscellaneous Chores
|
|
4
|
+
|
|
5
|
+
* use matched xcuitest/uia2 drivers ([#177](https://github.com/appium/appium-mcp/issues/177)) ([13089b2](https://github.com/appium/appium-mcp/commit/13089b2c9d9cbd44ce65ab70dcc45352d647e0ac))
|
|
6
|
+
|
|
1
7
|
## [1.19.0](https://github.com/appium/appium-mcp/compare/v1.18.1...v1.19.0) (2026-02-23)
|
|
2
8
|
|
|
3
9
|
### Features
|
package/package.json
CHANGED
package/server.json
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
"name": "io.github.appium/appium-mcp",
|
|
4
4
|
"title": "MCP Appium - Mobile Development and Automation Server",
|
|
5
5
|
"description": "MCP server for Appium mobile automation on iOS and Android devices with test creation tools.",
|
|
6
|
-
"version": "1.19.
|
|
6
|
+
"version": "1.19.1",
|
|
7
7
|
"packages": [
|
|
8
8
|
{
|
|
9
9
|
"registryType": "npm",
|
|
10
10
|
"identifier": "appium-mcp",
|
|
11
|
-
"version": "1.19.
|
|
11
|
+
"version": "1.19.1",
|
|
12
12
|
"transport": {
|
|
13
13
|
"type": "stdio"
|
|
14
14
|
}
|
|
@@ -1,3 +1,223 @@
|
|
|
1
|
+
## [7.0.0](https://github.com/appium/appium-uiautomator2-driver/compare/v6.9.3...v7.0.0) (2026-02-20)
|
|
2
|
+
|
|
3
|
+
### ⚠ BREAKING CHANGES
|
|
4
|
+
|
|
5
|
+
* modify the mobile:listApps style to follow XCUITest driver format
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
* modify the format of listApps to follow xcuitest format ([#986](https://github.com/appium/appium-uiautomator2-driver/issues/986)) ([f163507](https://github.com/appium/appium-uiautomator2-driver/commit/f1635079e3c495e7f5b68850781f907ed7fccae6))
|
|
10
|
+
|
|
11
|
+
## [6.9.3](https://github.com/appium/appium-uiautomator2-driver/compare/v6.9.2...v6.9.3) (2026-02-20)
|
|
12
|
+
|
|
13
|
+
### Reverts
|
|
14
|
+
|
|
15
|
+
* Revert "fix: modify the format of listApps to follow xcuitest format ([#983](https://github.com/appium/appium-uiautomator2-driver/issues/983))" ([#985](https://github.com/appium/appium-uiautomator2-driver/issues/985)) ([d5574c9](https://github.com/appium/appium-uiautomator2-driver/commit/d5574c9b522f1adf5cabdc3baed73bfbac1582cb))
|
|
16
|
+
|
|
17
|
+
## [6.9.2](https://github.com/appium/appium-uiautomator2-driver/compare/v6.9.1...v6.9.2) (2026-02-20)
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* modify the format of listApps to follow xcuitest format ([#983](https://github.com/appium/appium-uiautomator2-driver/issues/983)) ([d1e3528](https://github.com/appium/appium-uiautomator2-driver/commit/d1e35280ba392de0e491bbe3f5143ec3adefaebe))
|
|
22
|
+
|
|
23
|
+
## [6.9.1](https://github.com/appium/appium-uiautomator2-driver/compare/v6.9.0...v6.9.1) (2026-02-19)
|
|
24
|
+
|
|
25
|
+
### Miscellaneous Chores
|
|
26
|
+
|
|
27
|
+
* Set minimum axios dependency version to 1.13.5 ([f05897e](https://github.com/appium/appium-uiautomator2-driver/commit/f05897ee49bc23c9f0789b86b17eed3d5f934cb5))
|
|
28
|
+
|
|
29
|
+
## [6.9.0](https://github.com/appium/appium-uiautomator2-driver/compare/v6.8.2...v6.9.0) (2026-02-18)
|
|
30
|
+
|
|
31
|
+
### Features
|
|
32
|
+
|
|
33
|
+
* add mobile:listApps ([#982](https://github.com/appium/appium-uiautomator2-driver/issues/982)) ([b98268c](https://github.com/appium/appium-uiautomator2-driver/commit/b98268cfdb8cfd6bf1c8230576af732a2f343ebc))
|
|
34
|
+
|
|
35
|
+
## [6.8.2](https://github.com/appium/appium-uiautomator2-driver/compare/v6.8.1...v6.8.2) (2026-02-16)
|
|
36
|
+
|
|
37
|
+
### Bug Fixes
|
|
38
|
+
|
|
39
|
+
* format ([#981](https://github.com/appium/appium-uiautomator2-driver/issues/981)) ([d5bcefc](https://github.com/appium/appium-uiautomator2-driver/commit/d5bcefcfcf746eeadda7a249ac2ccdb03d58ccc8))
|
|
40
|
+
|
|
41
|
+
## [6.8.1](https://github.com/appium/appium-uiautomator2-driver/compare/v6.8.0...v6.8.1) (2026-02-13)
|
|
42
|
+
|
|
43
|
+
### Miscellaneous Chores
|
|
44
|
+
|
|
45
|
+
* Update appium-uiautomator2-server version to 9.11.1 ([87016a1](https://github.com/appium/appium-uiautomator2-driver/commit/87016a172143346a284f3a1ff2c47a8e7dc7d20b))
|
|
46
|
+
|
|
47
|
+
## [6.8.0](https://github.com/appium/appium-uiautomator2-driver/compare/v6.7.15...v6.8.0) (2026-02-02)
|
|
48
|
+
|
|
49
|
+
### Features
|
|
50
|
+
|
|
51
|
+
* Add `source` param to `mobile: pressKey` extension method ([#979](https://github.com/appium/appium-uiautomator2-driver/issues/979)) ([b1d0b21](https://github.com/appium/appium-uiautomator2-driver/commit/b1d0b2121f32dcfe561abfa4db0f627155c36274))
|
|
52
|
+
|
|
53
|
+
## [6.7.15](https://github.com/appium/appium-uiautomator2-driver/compare/v6.7.14...v6.7.15) (2026-01-30)
|
|
54
|
+
|
|
55
|
+
### Miscellaneous Chores
|
|
56
|
+
|
|
57
|
+
* Update appium-uiautomator2-server ([77f970c](https://github.com/appium/appium-uiautomator2-driver/commit/77f970c96d97c998792bb6586faa29790cb673f7))
|
|
58
|
+
|
|
59
|
+
## [6.7.14](https://github.com/appium/appium-uiautomator2-driver/compare/v6.7.13...v6.7.14) (2026-01-30)
|
|
60
|
+
|
|
61
|
+
### Miscellaneous Chores
|
|
62
|
+
|
|
63
|
+
* Update appium-uiautomator2-server version ([a06f196](https://github.com/appium/appium-uiautomator2-driver/commit/a06f196b22c326e7f23c8795fb270f6430756b96))
|
|
64
|
+
|
|
65
|
+
## [6.7.13](https://github.com/appium/appium-uiautomator2-driver/compare/v6.7.12...v6.7.13) (2026-01-28)
|
|
66
|
+
|
|
67
|
+
### Miscellaneous Chores
|
|
68
|
+
|
|
69
|
+
* **deps-dev:** bump @appium/eslint-config-appium-ts from 2.0.5 to 3.0.0 ([#978](https://github.com/appium/appium-uiautomator2-driver/issues/978)) ([09109a9](https://github.com/appium/appium-uiautomator2-driver/commit/09109a9f380d754551009498949197f256c117c1))
|
|
70
|
+
|
|
71
|
+
## [6.7.12](https://github.com/appium/appium-uiautomator2-driver/compare/v6.7.11...v6.7.12) (2026-01-27)
|
|
72
|
+
|
|
73
|
+
### Miscellaneous Chores
|
|
74
|
+
|
|
75
|
+
* **deps:** bump asyncbox from 4.1.1 to 6.0.1 ([#977](https://github.com/appium/appium-uiautomator2-driver/issues/977)) ([042c71b](https://github.com/appium/appium-uiautomator2-driver/commit/042c71b3afff181eacf1cd16c76a7f547221a605))
|
|
76
|
+
|
|
77
|
+
## [6.7.11](https://github.com/appium/appium-uiautomator2-driver/compare/v6.7.10...v6.7.11) (2026-01-23)
|
|
78
|
+
|
|
79
|
+
### Miscellaneous Chores
|
|
80
|
+
|
|
81
|
+
* Exclude tests from published dist ([4f2cf50](https://github.com/appium/appium-uiautomator2-driver/commit/4f2cf50716c87956d9b8654cca453dbbfb63b640))
|
|
82
|
+
|
|
83
|
+
## [6.7.10](https://github.com/appium/appium-uiautomator2-driver/compare/v6.7.9...v6.7.10) (2026-01-16)
|
|
84
|
+
|
|
85
|
+
### Miscellaneous Chores
|
|
86
|
+
|
|
87
|
+
* Update appium-android-driver to version 12.6.4 ([a67b51a](https://github.com/appium/appium-uiautomator2-driver/commit/a67b51a9c2f827c93bcee4af6de6b54f8a345598))
|
|
88
|
+
|
|
89
|
+
## [6.7.9](https://github.com/appium/appium-uiautomator2-driver/compare/v6.7.8...v6.7.9) (2026-01-13)
|
|
90
|
+
|
|
91
|
+
### Miscellaneous Chores
|
|
92
|
+
|
|
93
|
+
* Bump appium-android-driver ([92ff8c7](https://github.com/appium/appium-uiautomator2-driver/commit/92ff8c7cc94aa6dd595d40cfc97055998503f4a1))
|
|
94
|
+
|
|
95
|
+
## [6.7.8](https://github.com/appium/appium-uiautomator2-driver/compare/v6.7.7...v6.7.8) (2025-12-25)
|
|
96
|
+
|
|
97
|
+
### Miscellaneous Chores
|
|
98
|
+
|
|
99
|
+
* Migrate index to typescript ([#972](https://github.com/appium/appium-uiautomator2-driver/issues/972)) ([381fadd](https://github.com/appium/appium-uiautomator2-driver/commit/381fadd7b3e53ad7fa9bd16e8e60d563ebfc8c24))
|
|
100
|
+
|
|
101
|
+
## [6.7.7](https://github.com/appium/appium-uiautomator2-driver/compare/v6.7.6...v6.7.7) (2025-12-24)
|
|
102
|
+
|
|
103
|
+
### Miscellaneous Chores
|
|
104
|
+
|
|
105
|
+
* Migrate the rest of command modules to typescript ([#971](https://github.com/appium/appium-uiautomator2-driver/issues/971)) ([1e7606c](https://github.com/appium/appium-uiautomator2-driver/commit/1e7606ccc41b19ace7b7ced898329f84a4774280))
|
|
106
|
+
|
|
107
|
+
## [6.7.6](https://github.com/appium/appium-uiautomator2-driver/compare/v6.7.5...v6.7.6) (2025-12-23)
|
|
108
|
+
|
|
109
|
+
### Miscellaneous Chores
|
|
110
|
+
|
|
111
|
+
* Migrate various command modules to typescript (part 2) ([#970](https://github.com/appium/appium-uiautomator2-driver/issues/970)) ([976d79d](https://github.com/appium/appium-uiautomator2-driver/commit/976d79dcb122f5ba28128d16c7b90a5d37dc868f))
|
|
112
|
+
|
|
113
|
+
## [6.7.5](https://github.com/appium/appium-uiautomator2-driver/compare/v6.7.4...v6.7.5) (2025-12-22)
|
|
114
|
+
|
|
115
|
+
### Miscellaneous Chores
|
|
116
|
+
|
|
117
|
+
* **deps:** bump teen_process from 3.0.6 to 4.0.4 ([#969](https://github.com/appium/appium-uiautomator2-driver/issues/969)) ([ff5d39f](https://github.com/appium/appium-uiautomator2-driver/commit/ff5d39f24bba4295729e5ff3a1ed114dd6a349c0))
|
|
118
|
+
|
|
119
|
+
## [6.7.4](https://github.com/appium/appium-uiautomator2-driver/compare/v6.7.3...v6.7.4) (2025-12-22)
|
|
120
|
+
|
|
121
|
+
### Miscellaneous Chores
|
|
122
|
+
|
|
123
|
+
* Migrate various .js modules to typescript (part 1) ([#968](https://github.com/appium/appium-uiautomator2-driver/issues/968)) ([999aa17](https://github.com/appium/appium-uiautomator2-driver/commit/999aa17f09fc246c99d332583f6d55bd47df5e57))
|
|
124
|
+
|
|
125
|
+
## [6.7.3](https://github.com/appium/appium-uiautomator2-driver/compare/v6.7.2...v6.7.3) (2025-12-18)
|
|
126
|
+
|
|
127
|
+
### Miscellaneous Chores
|
|
128
|
+
|
|
129
|
+
* **deps:** bump asyncbox from 3.0.0 to 4.0.1 ([#967](https://github.com/appium/appium-uiautomator2-driver/issues/967)) ([38d3274](https://github.com/appium/appium-uiautomator2-driver/commit/38d3274969194660bbfb5fef5245f9aef0ca49c9))
|
|
130
|
+
|
|
131
|
+
## [6.7.2](https://github.com/appium/appium-uiautomator2-driver/compare/v6.7.1...v6.7.2) (2025-12-17)
|
|
132
|
+
|
|
133
|
+
### Miscellaneous Chores
|
|
134
|
+
|
|
135
|
+
* **deps-dev:** bump @types/node from 24.10.4 to 25.0.3 ([#966](https://github.com/appium/appium-uiautomator2-driver/issues/966)) ([d1c5007](https://github.com/appium/appium-uiautomator2-driver/commit/d1c5007adc2157145bfbabd8dd07c66b646460a9))
|
|
136
|
+
|
|
137
|
+
## [6.7.1](https://github.com/appium/appium-uiautomator2-driver/compare/v6.7.0...v6.7.1) (2025-12-12)
|
|
138
|
+
|
|
139
|
+
### Miscellaneous Chores
|
|
140
|
+
|
|
141
|
+
* **deps:** remove `source-map-support` ([#962](https://github.com/appium/appium-uiautomator2-driver/issues/962)) ([2bd655d](https://github.com/appium/appium-uiautomator2-driver/commit/2bd655d577a41885f3b910d6405d6826c16b7b67))
|
|
142
|
+
|
|
143
|
+
## [6.7.0](https://github.com/appium/appium-uiautomator2-driver/compare/v6.6.3...v6.7.0) (2025-12-09)
|
|
144
|
+
|
|
145
|
+
### Features
|
|
146
|
+
|
|
147
|
+
* add appium:adbListenAllNetwork with uiautomator2:adb_listen_all_network flag to add -a option for adb ([#955](https://github.com/appium/appium-uiautomator2-driver/issues/955)) ([5b0fa8b](https://github.com/appium/appium-uiautomator2-driver/commit/5b0fa8b61b41b9273f272c9a426b048463b51ddc))
|
|
148
|
+
|
|
149
|
+
## [6.6.3](https://github.com/appium/appium-uiautomator2-driver/compare/v6.6.2...v6.6.3) (2025-12-08)
|
|
150
|
+
|
|
151
|
+
### Miscellaneous Chores
|
|
152
|
+
|
|
153
|
+
* Ditch usage of @appium/test-support ([#954](https://github.com/appium/appium-uiautomator2-driver/issues/954)) ([9351cfc](https://github.com/appium/appium-uiautomator2-driver/commit/9351cfc9ef911155634abc06d28b497e182657c2))
|
|
154
|
+
|
|
155
|
+
## [6.6.2](https://github.com/appium/appium-uiautomator2-driver/compare/v6.6.1...v6.6.2) (2025-12-03)
|
|
156
|
+
|
|
157
|
+
### Bug Fixes
|
|
158
|
+
|
|
159
|
+
* Update mobile: screenshots endpoint to properly handle virtual display ids ([#951](https://github.com/appium/appium-uiautomator2-driver/issues/951)) ([5e96d51](https://github.com/appium/appium-uiautomator2-driver/commit/5e96d518372c332b108d28f96a0303ac6f97a1e9))
|
|
160
|
+
|
|
161
|
+
## [6.6.1](https://github.com/appium/appium-uiautomator2-driver/compare/v6.6.0...v6.6.1) (2025-12-02)
|
|
162
|
+
|
|
163
|
+
### Miscellaneous Chores
|
|
164
|
+
|
|
165
|
+
* Document new properties on list.. methods ([#950](https://github.com/appium/appium-uiautomator2-driver/issues/950)) ([1c74692](https://github.com/appium/appium-uiautomator2-driver/commit/1c7469240bd1be919bf017ea682806288eb7b526))
|
|
166
|
+
|
|
167
|
+
## [6.6.0](https://github.com/appium/appium-uiautomator2-driver/compare/v6.5.0...v6.6.0) (2025-12-01)
|
|
168
|
+
|
|
169
|
+
### Features
|
|
170
|
+
|
|
171
|
+
* Add documentation for 'mobile: listDisplays' API ([#948](https://github.com/appium/appium-uiautomator2-driver/issues/948)) ([df7ca78](https://github.com/appium/appium-uiautomator2-driver/commit/df7ca7816da2f4dd71482cfaabd9d51ba86a2206))
|
|
172
|
+
|
|
173
|
+
## [6.5.0](https://github.com/appium/appium-uiautomator2-driver/compare/v6.4.1...v6.5.0) (2025-12-01)
|
|
174
|
+
|
|
175
|
+
### Features
|
|
176
|
+
|
|
177
|
+
* Add 'mobile: listWindows' execute method ([#945](https://github.com/appium/appium-uiautomator2-driver/issues/945)) ([78ef335](https://github.com/appium/appium-uiautomator2-driver/commit/78ef335b7c3f7193f3e93f99250041f3747ccb13))
|
|
178
|
+
|
|
179
|
+
## [6.4.1](https://github.com/appium/appium-uiautomator2-driver/compare/v6.4.0...v6.4.1) (2025-11-30)
|
|
180
|
+
|
|
181
|
+
### Bug Fixes
|
|
182
|
+
|
|
183
|
+
* Add missing /appium prefix to the custom endpoint ([#944](https://github.com/appium/appium-uiautomator2-driver/issues/944)) ([deed050](https://github.com/appium/appium-uiautomator2-driver/commit/deed050054bc93e98cc24dc28710902589475c29))
|
|
184
|
+
|
|
185
|
+
## [6.4.0](https://github.com/appium/appium-uiautomator2-driver/compare/v6.3.0...v6.4.0) (2025-11-30)
|
|
186
|
+
|
|
187
|
+
### Features
|
|
188
|
+
|
|
189
|
+
* Add 'mobile: resetAccessibilityCache' API ([#943](https://github.com/appium/appium-uiautomator2-driver/issues/943)) ([97fceda](https://github.com/appium/appium-uiautomator2-driver/commit/97fceda17ee59fd45df7fe1c285d3e60399bebd3))
|
|
190
|
+
|
|
191
|
+
## [6.3.0](https://github.com/appium/appium-uiautomator2-driver/compare/v6.2.1...v6.3.0) (2025-11-21)
|
|
192
|
+
|
|
193
|
+
### Features
|
|
194
|
+
|
|
195
|
+
* add context for BiDi - log.entryAdded event ([#941](https://github.com/appium/appium-uiautomator2-driver/issues/941)) ([ec14146](https://github.com/appium/appium-uiautomator2-driver/commit/ec14146cd288d4eaf4ad259aed5019532531ff51))
|
|
196
|
+
|
|
197
|
+
## [6.2.1](https://github.com/appium/appium-uiautomator2-driver/compare/v6.2.0...v6.2.1) (2025-11-17)
|
|
198
|
+
|
|
199
|
+
### Miscellaneous Chores
|
|
200
|
+
|
|
201
|
+
* Bump android driver ([18df1b5](https://github.com/appium/appium-uiautomator2-driver/commit/18df1b512455a5b9207fb603f2db7551e7560a5e))
|
|
202
|
+
|
|
203
|
+
## [6.2.0](https://github.com/appium/appium-uiautomator2-driver/compare/v6.1.2...v6.2.0) (2025-11-16)
|
|
204
|
+
|
|
205
|
+
### Features
|
|
206
|
+
|
|
207
|
+
* Document 'mobile: getChromeCapabilities' extension ([#938](https://github.com/appium/appium-uiautomator2-driver/issues/938)) ([2adb038](https://github.com/appium/appium-uiautomator2-driver/commit/2adb03869d3e5d97e065446b75bfe0c7b641ba67))
|
|
208
|
+
|
|
209
|
+
## [6.1.2](https://github.com/appium/appium-uiautomator2-driver/compare/v6.1.1...v6.1.2) (2025-11-15)
|
|
210
|
+
|
|
211
|
+
### Miscellaneous Chores
|
|
212
|
+
|
|
213
|
+
* publish via trusted publisher ([#937](https://github.com/appium/appium-uiautomator2-driver/issues/937)) ([a04f3d4](https://github.com/appium/appium-uiautomator2-driver/commit/a04f3d4d902ffb67d3156d3f71d9d72e6e4286d7))
|
|
214
|
+
|
|
215
|
+
## [6.1.1](https://github.com/appium/appium-uiautomator2-driver/compare/v6.1.0...v6.1.1) (2025-11-09)
|
|
216
|
+
|
|
217
|
+
### Miscellaneous Chores
|
|
218
|
+
|
|
219
|
+
* Migrate UiAutomator2Server class to typescript ([#936](https://github.com/appium/appium-uiautomator2-driver/issues/936)) ([ed22e9a](https://github.com/appium/appium-uiautomator2-driver/commit/ed22e9aff54f991b2a81b6c4aab7baba878ef638))
|
|
220
|
+
|
|
1
221
|
## [6.1.0](https://github.com/appium/appium-uiautomator2-driver/compare/v6.0.2...v6.1.0) (2025-10-30)
|
|
2
222
|
|
|
3
223
|
### Features
|
|
@@ -84,11 +84,11 @@ appium:forceAppLaunch | Set it to `true` if you want the application under test
|
|
|
84
84
|
appium:shouldTerminateApp | Set it to `true` if you want the application under test to be always terminated on session end even if `appium:noReset` is `true`. If `noReset` is falsy, then the app under test is going to be terminated if `appium:dontStopAppOnReset` is also falsy (the default behavior). `false` by default
|
|
85
85
|
appium:autoLaunch | Whether to launch the application under test automatically (`true`, the default value) after a test starts
|
|
86
86
|
appium:autoGrantPermissions | Whether to grant all the requested application permissions automatically when a test starts(`true`). The targetSdkVersion in the application manifest must be greater or equal to 23 and the Android version on the device under test must be greater or equal to Android 6 (API level 23) to grant permissions. Applications whose targetSdkVersion is lower than or equal to 22 must be reinstalled to grant permissions, for example, by setting the `appium:fullReset` capability as `true` for Android 6+ devices. If your app needs some special security permissions, like access to notifications or media recording, consider using [mobile: changePermissions](#mobile-changepermissions) extension with `appops` target. `false` by default
|
|
87
|
-
appium:otherApps | Allows to set one or more comma-separated paths to Android packages that are going to be installed along with the main application under test. This
|
|
87
|
+
appium:otherApps | Allows to set one or more comma-separated paths to Android packages that are going to be installed along with the main application under test. This may be useful if the tested app has dependencies
|
|
88
88
|
appium:uninstallOtherPackages | Allows to set one or more comma-separated package identifiers to be uninstalled from the device before a test starts
|
|
89
89
|
appium:allowTestPackages | If set to `true` then it would be possible to use packages built with the test flag for the automated testing (literally adds `-t` flag to the `adb install` command). `false` by default
|
|
90
90
|
appium:remoteAppsCacheLimit | Sets the maximum amount of application packages to be cached on the device under test. This is needed for devices that don't support streamed installs (Android 7 and below), because ADB must push app packages to the device first in order to install them, which takes some time. Setting this capability to zero disables apps caching. `10` by default.
|
|
91
|
-
appium:enforceAppInstall | If set to `true` then the application under test is always reinstalled even if a newer version of it already exists on the device under test. This capability has no effect if `appium:noReset` is set to `true`. `false` by default
|
|
91
|
+
appium:enforceAppInstall | If set to `true` then the application under test is always reinstalled even if a newer version of it already exists on the device under test. This capability has no effect if `appium:noReset` is set to `true`. `false` by default.
|
|
92
92
|
|
|
93
93
|
### App Localization
|
|
94
94
|
|
|
@@ -115,6 +115,7 @@ appium:mockLocationApp | Sets the package identifier of the app, which is used a
|
|
|
115
115
|
appium:logcatFormat | The log print format, where `format` is one of: `brief` `process` `tag` `thread` `raw` `time` `threadtime` `long`. `threadtime` is the default value.
|
|
116
116
|
appium:logcatFilterSpecs | Series of `tag[:priority]` where `tag` is a log component tag (or * for all) and priority is: `V Verbose`, `D Debug`, `I Info`, `W Warn`, `E Error`, `F Fatal`, `S Silent (supress all output)`. '*' means '*:d' and `tag` by itself means `tag:v`. If not specified on the commandline, filterspec is set from ANDROID_LOG_TAGS. If no filterspec is found, filter defaults to '*:I'.
|
|
117
117
|
appium:allowDelayAdb | Being set to `false` prevents emulator to use `-delay-adb` feature to detect its startup. See https://github.com/appium/appium/issues/14773 for more details.
|
|
118
|
+
appium:adbListenAllNetwork | Being set to `true` adds `-a` ADB command line global option. Requires `uiautomator2:adb_listen_all_network` [security feature](https://github.com/appium/appium/blob/master/packages/appium/docs/en/guides/security.md) to be enabled. Unset by default. Available since driver version 6.7.0.
|
|
118
119
|
|
|
119
120
|
### Emulator (Android Virtual Device)
|
|
120
121
|
|
|
@@ -145,7 +146,7 @@ appium:noSign | Set it to `true` in order to skip application signing. By defaul
|
|
|
145
146
|
|
|
146
147
|
Capability Name | Description
|
|
147
148
|
--- | ---
|
|
148
|
-
appium:skipUnlock | Whether to skip the check for lock screen presence (`true`). The default driver behaviour is to verify the presence of the screen lock (e.g. 'false' value of the capability) before starting the test and to unlock that (which sometimes
|
|
149
|
+
appium:skipUnlock | Whether to skip the check for lock screen presence (`true`). The default driver behaviour is to verify the presence of the screen lock (e.g. 'false' value of the capability) before starting the test and to unlock that (which sometimes may be unstable). Note, that this operation takes some time, so it is highly recommended to set this capability to `true` and disable screen locking on device(s) under test. Read the [Unlock tutorial](./docs/unlock/main.md) for more details.
|
|
149
150
|
appium:unlockType | Set one of the possible types of Android lock screens to unlock. Read the [Unlock tutorial](./docs/unlock/main.md) for more details.
|
|
150
151
|
appium:unlockKey | Allows to set an unlock key. Read the [Unlock tutorial](./docs/unlock/main.md) for more details.
|
|
151
152
|
appium:unlockStrategy | Either 'locksettings' (default) or 'uiautomator'. Read the [Unlock tutorial](./docs/unlock/main.md) for more details.
|
|
@@ -189,10 +190,10 @@ appium:chromedriverForwardBiDi | Being set to `true` enables automated forwardin
|
|
|
189
190
|
|
|
190
191
|
Capability Name | Description
|
|
191
192
|
--- | ---
|
|
192
|
-
appium:disableSuppressAccessibilityService | Being set to `true` tells the instrumentation process to not suppress accessibility services during the automated test. This
|
|
193
|
-
appium:userProfile | Integer identifier of a [user profile](https://source.android.com/devices/tech/admin/multi-user). By default the app under test is installed for the currently active user, but in case it is necessary to test how the app performs while being installed for a user profile, which is different from the current one, then this capability
|
|
193
|
+
appium:disableSuppressAccessibilityService | Being set to `true` tells the instrumentation process to not suppress accessibility services during the automated test. This may be useful if your automated test needs these services. `false` by default
|
|
194
|
+
appium:userProfile | Integer identifier of a [user profile](https://source.android.com/devices/tech/admin/multi-user). By default the app under test is installed for the currently active user, but in case it is necessary to test how the app performs while being installed for a user profile, which is different from the current one, then this capability may come in handy.
|
|
194
195
|
appium:newCommandTimeout | How long (in seconds) the driver should wait for a new command from the client before assuming the client has stopped sending requests. After the timeout the session is going to be deleted. `60` seconds by default. Setting it to zero disables the timer.
|
|
195
|
-
appium:skipLogcatCapture | Skips to start capturing logs such as logcat. It
|
|
196
|
+
appium:skipLogcatCapture | Skips to start capturing logs such as logcat. It may improve network performance. Log-related commands won't work if the capability is enabled. Defaults to `false`.
|
|
196
197
|
appium:timeZone | Overrides the current device's time zone since the driver version 3.1.0. This change is preserved until the next override. The time zone identifier must be a valid name from the list of [available time zone identifiers](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), for example `Europe/Kyiv`
|
|
197
198
|
|
|
198
199
|
|
|
@@ -243,6 +244,7 @@ pane-title | Title of the pane represented by this element. Available for API 28
|
|
|
243
244
|
actions | The comma-separated id names of the available accessibility actions for the element from [getActionList](https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#getActionList()). Available only if `includeA11yActionsInPageSource` setting is turned on. | 'ACTION_FOCUS,ACTION_SELECT,ACTION_CLEAR_SELECTION,ACTION_CLICK,ACTION_ACCESSIBILITY_FOCUS,ACTION_NEXT_AT_MOVEMENT_GRANULARITY,ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY,ACTION_SET_SELECTION,ACTION_SHOW_ON_SCREEN'
|
|
244
245
|
tooltip-text | The result of [getTooltipText](https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#getTooltipText()). Could be `null`, available for API 28+ | 'Paste'
|
|
245
246
|
text-has-clickable-span | Indicates whether the `TextView` content contains `ClickableSpan` or `URLSpan` elements, `null` in all other cases. | 'true'
|
|
247
|
+
window-id | The integer identifier of the [accessbility window](https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo) this element belongs to. In some rare cases, it may not be present if the window identifier cannot be determined. | 123
|
|
246
248
|
|
|
247
249
|
|
|
248
250
|
## Element Location
|
|
@@ -257,8 +259,10 @@ className | This strategy is mapped to the native UiAutomator's `By.clazz` [loca
|
|
|
257
259
|
-android uiautomator | This strategy is mapped to the native UiAutomator's `UiSelector` [locator](https://developer.android.com/reference/androidx/test/uiautomator/UiSelector)). It is even possible to perform some advanced operations, like scrolling, with this locator type. Check [Guide on UiAutomator Locator Types](docs/uiautomator-uiselector.md) | `⭐⭐⭐⭐` | new UiScrollable(new UiSelector().resourceId(\"android:id/list\")).scrollIntoView(new UiSelector().text(\"Radio Group\"))
|
|
258
260
|
xpath | For elements lookup Xpath strategy the driver uses the same XML tree that is generated by page source API. Only Xpath 1.0 is supported for appium-uiatomator2-server versions below 4.25.0. All server versions starting from 4.25.0 support both Xpath 1.0 and 2.0 | `⭐⭐⭐` | By.xpath("//android.view.View[@text=\"Regular\" and @checkable=\"true\"]")
|
|
259
261
|
|
|
262
|
+
> [!NOTE] For testing multi-window applications, see the [Multi-Window Testing Guide](docs/android-multiwindow.md).
|
|
263
|
+
|
|
260
264
|
> [!WARNING]
|
|
261
|
-
> Google is going to [deprecate](https://developer.android.com/training/testing/other-components/ui-automator#ui-automator)
|
|
265
|
+
> Google is going to [deprecate](https://developer.android.com/training/testing/other-components/ui-automator-legacy#ui-automator)
|
|
262
266
|
> and remove `UiCollection`, `UiObject`, `UiScrollable`, and `UiSelector` support from the UiAutomator framework.
|
|
263
267
|
> This will render all `-android uiautomator`-based locators invalid, so please keep it in mind while
|
|
264
268
|
> using them or plan to use them in the future.
|
|
@@ -305,8 +309,8 @@ actionAcknowledgmentTimeout | long | Maximum number of milliseconds to wait for
|
|
|
305
309
|
allowInvisibleElements | boolean | Whether to include elements that are not visible to the user (e. g. whose `displayed` attribute is `false`) to the XML source tree. `false` by default
|
|
306
310
|
ignoreUnimportantViews | boolean | Enables or disables layout hierarchy compression. If compression is enabled, the layout hierarchy derived from the Acessibility framework will only contain nodes that are important for uiautomator testing. Any unnecessary surrounding layout nodes that make viewing and searching the hierarchy inefficient are removed. `false` by default
|
|
307
311
|
elementResponseAttributes | string | Comma-separated list of element attribute names to be included into findElement response. By default only element UUID is present there, but it is also possible to add the following items: `name`, `text`, `rect`, `enabled`, `displayed`, `selected`, `attribute/<element_attribute_name>`. It is required that `shouldUseCompactResponses` setting is set to `false` in order for this one to apply.
|
|
308
|
-
enableMultiWindows | boolean | Whether to include all windows that the user can interact with (for example an on-screen keyboard) while building the XML page source (`true`). By default it is `false` and only the single active application window is included to the page source.
|
|
309
|
-
enableTopmostWindowFromActivePackage | boolean | Whether to limit the window with the highest Z-order from the active package for interactions and page source retrieval. By default it is `false` and the active application window, which may not necessarily have this order, is included to the page source.
|
|
312
|
+
enableMultiWindows | boolean | Whether to include all windows that the user can interact with (for example an on-screen keyboard) while building the XML page source (`true`). By default it is `false` and only the single active application window is included to the page source. See the [Multi-Window Testing Guide](docs/android-multiwindow.md) for detailed information.
|
|
313
|
+
enableTopmostWindowFromActivePackage | boolean | Whether to limit the window with the highest Z-order from the active package for interactions and page source retrieval. By default it is `false` and the active application window, which may not necessarily have this order, is included to the page source. See the [Multi-Window Testing Guide](docs/android-multiwindow.md) for detailed information.
|
|
310
314
|
enableNotificationListener | boolean | Whether to enable (`true`) toast notifications listener to listen for new toast notifications. By default this listener is enabled and UiAutomator2 server includes the text of toast messages to the generated XML page source, but not for longer than `3500` ms after the corresponding notification expires.
|
|
311
315
|
keyInjectionDelay | long | Delay in milliseconds between key presses when injecting text input. 0 ms by default
|
|
312
316
|
scrollAcknowledgmentTimeout | long | Timeout for waiting for an acknowledgement of an uiautomator scroll swipe action. The acknowledgment is an [AccessibilityEvent](http://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.html), corresponding to the scroll action, that lets the framework determine if the scroll action was successful. Generally, this timeout should not be modified. `200` ms by default
|
|
@@ -331,7 +335,8 @@ disableIdLocatorAutocompletion | boolean | According to internal Android standar
|
|
|
331
335
|
includeExtrasInPageSource | boolean | Whether to include `extras` element attribute in the XML page source result. Then, XPath locator can find the element by the extras. Its value consists of combined [getExtras](https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#getExtras()) as `keys=value` pair separated by a semicolon (`;`), thus you may need to find the element with partial matching like `contains` e.g. `driver.find_element :xpath, '//*[contains(@extras, "AccessibilityNodeInfo.roleDescription=")]'`. The value could be huge if elements in the XML page source have large `extras`. It could affect the performance of XML page source generation.
|
|
332
336
|
includeA11yActionsInPageSource | boolean | Whether to include `actions` element attribute in the XML page source result. Its value consists of names of available accessibility actions from [getActionList](https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#getActionList()), separated by a comma. The value could be huge if elements in the XML page source have a lot of actions and could affect the performance of XML page source generation.
|
|
333
337
|
snapshotMaxDepth | int | The number of maximum depth for the source tree snapshot. The default value is `70`. This number should be in range [1, 500]. A part of the elements source tree might be lost if the value is too low. Also, StackOverflowError might be caused if the value is too high (Issues [12545](https://github.com/appium/appium/issues/12545), [12892](https://github.com/appium/appium/issues/12892)). The available driver version is `2.27.0` or higher.
|
|
334
|
-
currentDisplayId | int | The id of the display that should be used when finding elements, taking screenshots, etc. It can be found in the output of `adb shell dumpsys display` (search for `mDisplayId`). The default value is [Display.DEFAULT_DISPLAY](https://developer.android.com/reference/android/view/Display#DEFAULT_DISPLAY).
|
|
338
|
+
currentDisplayId | int | The id of the display that should be used when finding elements, taking screenshots, etc. It can be found in the output of `adb shell dumpsys display` (search for `mDisplayId`). The default value is [Display.DEFAULT_DISPLAY](https://developer.android.com/reference/android/view/Display#DEFAULT_DISPLAY). See the [Multi-Window Testing Guide](docs/android-multiwindow.md) for detailed information about windows, displays, and how this setting affects element location. Set this setting to `-1`
|
|
339
|
+
in order to reset it.
|
|
335
340
|
alwaysTraversableViewClasses | string | Allows to continue the tree traversal for user defined classes even though the node itself is invisible. The default logic for the UI tree traversal (controlled by the `allowInvisibleElements` setting) is to stop recursing when an invisible node is found. However, with certain Jetpack Compose classes (e.g. androidx.compose.ui.viewinterop.ViewFactoryHolder), it is possible that invisible parent nodes have visible child nodes. See [Google issue \#354958193](https://issuetracker.google.com/issues/354958193) and [UIA2 server issue \#709](https://github.com/appium/appium-uiautomator2-server/issues/709) for more details. This setting only affects the XPath lookup and the page source buildup. You can provide a comma separated list of glob patterns, that will be used as an exemption list: `androidx.compose.ui.viewinterop.*,android.widget.ImageButton`.
|
|
336
341
|
|
|
337
342
|
|
|
@@ -383,7 +388,7 @@ object result = driver.ExecuteScript("mobile: <methodName>", new Dictionary<stri
|
|
|
383
388
|
|
|
384
389
|
### mobile: shell
|
|
385
390
|
|
|
386
|
-
Executes the given shell command on the device under test via ADB connection. This extension exposes a potential security risk and thus is only enabled when explicitly activated by the `adb_shell` server command line feature specifier.
|
|
391
|
+
Executes the given shell command on the device under test via ADB connection. This extension exposes a potential security risk and thus is only enabled when explicitly activated by the `uiautomator2:adb_shell` server command line feature specifier.
|
|
387
392
|
|
|
388
393
|
#### Arguments
|
|
389
394
|
|
|
@@ -524,6 +529,106 @@ Retrieves the information about the device under test, like the device model, se
|
|
|
524
529
|
|
|
525
530
|
The extension returns a dictionary whose entries are the device properties. Check https://github.com/appium/appium-uiautomator2-server/blob/master/app/src/main/java/io/appium/uiautomator2/handler/GetDeviceInfo.java to get the full list of returned keys and their corresponding values.
|
|
526
531
|
|
|
532
|
+
### mobile: resetAccessibilityCache
|
|
533
|
+
|
|
534
|
+
Resets the accessibility cache on the device. This can be useful when the accessibility
|
|
535
|
+
service cache becomes stale and needs to be refreshed to reflect the current UI state.
|
|
536
|
+
The driver does cache reset automatically before any element lookup as well as before
|
|
537
|
+
retrieving a page source, hovewer it makes sense to call this method manually to avoid stale reference errors or interaction issues if the application under test posseses
|
|
538
|
+
highly dynamic elements. Note that this methods also waits until app under test becomes
|
|
539
|
+
idle, so it might also slow down your automation if called too often under non-idling
|
|
540
|
+
circumstances.
|
|
541
|
+
|
|
542
|
+
### mobile: listWindows
|
|
543
|
+
|
|
544
|
+
Gets a list of windows on all displays. For Android API 30+ (R), uses `getWindowsOnAllDisplays()` to retrieve windows from all displays. For older APIs, uses `getWindows()` which only returns windows from the default display.
|
|
545
|
+
|
|
546
|
+
#### Arguments
|
|
547
|
+
|
|
548
|
+
Name | Type | Required | Description | Example
|
|
549
|
+
--- | --- | --- | --- | ---
|
|
550
|
+
filters | object | no | Optional filters to apply to the window list. All filters are applied with AND logic (all must match). Supported filter keys: | `{packageName: 'com.example.app', displayId: 0}`
|
|
551
|
+
| | | | `packageName` (string): Package name pattern with glob support (e.g., `com.example.*`) |
|
|
552
|
+
| | | | `windowId` (number): Window identifier |
|
|
553
|
+
| | | | `displayId` (number): Display identifier |
|
|
554
|
+
| | | | `physicalDisplayId` (string): Physical display identifier (as string to avoid JavaScript number precision issues) |
|
|
555
|
+
| | | | `type` (number): Window type (see [AccessibilityWindowInfo.TYPE_*](https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#TYPE_APPLICATION) constants) |
|
|
556
|
+
| | | | `title` (string): Window title pattern with glob support |
|
|
557
|
+
| | | | `layer` (number): Window Z-order layer (higher values are on top) |
|
|
558
|
+
| | | | `isAccessibilityFocused` (boolean): Whether the window has accessibility focus |
|
|
559
|
+
| | | | `isActive` (boolean): Whether the window is active |
|
|
560
|
+
| | | | `isFocused` (boolean): Whether the window has input focus |
|
|
561
|
+
| | | | `isInPictureInPictureMode` (boolean): Whether the window is in picture-in-picture mode |
|
|
562
|
+
skipScreenshots | boolean | no | Whether to skip taking screenshots for each window. Defaults to `false`. Setting this to `true` can improve performance. Screenshots are only available on Android API 34+ even when this is `false`. | true
|
|
563
|
+
|
|
564
|
+
#### Returned Result
|
|
565
|
+
|
|
566
|
+
The extension returns an array of window information objects. Each object contains:
|
|
567
|
+
|
|
568
|
+
Name | Type | Description | Example
|
|
569
|
+
--- | --- | --- | ---
|
|
570
|
+
windowId | number \| null | Window identifier (may be null if the window ID cannot be determined) | 42
|
|
571
|
+
displayId | number | Display identifier where the window is located | 0
|
|
572
|
+
physicalDisplayId | string \| null | Physical display identifier (may be null). Returned as a string to avoid JavaScript number precision issues with large values. | '1234567890'
|
|
573
|
+
virtualDisplayId | string \| null | Virtual display identifier (may be null). Only set for virtual displays, null otherwise. Parsed from 'dumpsys SurfaceFlinger --displays' output by matching display name. | '12345'
|
|
574
|
+
rect | object | Window bounds rectangle with `left`, `top`, `right`, `bottom` properties | `{left: 0, top: 0, right: 1080, bottom: 1920}`
|
|
575
|
+
packageName | string \| null | Package name of the application that owns this window (may be null) | `com.example.app`
|
|
576
|
+
screenshot | string \| null | Base64-encoded PNG screenshot of the window (may be null). Only available on Android API 34+ and when `skipScreenshots` is `false`. | `iVBORw0KGgoAAAANSUhEUgAA...`
|
|
577
|
+
type | number | Window type. See [AccessibilityWindowInfo.TYPE_*](https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#TYPE_APPLICATION) constants for possible values (e.g., `TYPE_APPLICATION`, `TYPE_INPUT_METHOD`, `TYPE_SYSTEM`, `TYPE_ACCESSIBILITY_OVERLAY`, `TYPE_SPLIT_SCREEN_DIVIDER`). | 1
|
|
578
|
+
title | string \| null | Window title (may be null) | 'My App Window'
|
|
579
|
+
layer | number | Window Z-order layer. Higher values indicate windows that are drawn on top of windows with lower layer values. | 100
|
|
580
|
+
isAccessibilityFocused | boolean | Whether the window has accessibility focus | true
|
|
581
|
+
isActive | boolean | Whether the window is active | true
|
|
582
|
+
isFocused | boolean | Whether the window has input focus | true
|
|
583
|
+
isInPictureInPictureMode | boolean | Whether the window is in picture-in-picture mode | false
|
|
584
|
+
|
|
585
|
+
### mobile: listDisplays
|
|
586
|
+
|
|
587
|
+
Gets a list of all displays available on the device.
|
|
588
|
+
|
|
589
|
+
#### Returned Result
|
|
590
|
+
|
|
591
|
+
The extension returns an array of display information objects. Each object contains:
|
|
592
|
+
|
|
593
|
+
Name | Type | Description | Example
|
|
594
|
+
--- | --- | --- | ---
|
|
595
|
+
id | number | Display identifier (logical display ID). This is the value used by the `currentDisplayId` setting. | 0
|
|
596
|
+
name | string \| null | Display name (may be null) | 'Built-in Screen'
|
|
597
|
+
physicalId | string \| null | Physical display identifier (may be null). Returned as a string to avoid JavaScript number precision issues with large values. This is the value used by the `mobile: screenshots` method. | '1234567890'
|
|
598
|
+
virtualId | string \| null | Virtual display identifier (may be null). Only set for virtual displays, null otherwise. Parsed from 'dumpsys SurfaceFlinger --displays' output by matching display name. | '12345'
|
|
599
|
+
metrics | object | Display metrics containing size and density information. See below for details. | See metrics table
|
|
600
|
+
isDefault | boolean | Whether this is the default display | true
|
|
601
|
+
|
|
602
|
+
#### Display Metrics
|
|
603
|
+
|
|
604
|
+
The `metrics` object contains the following properties:
|
|
605
|
+
|
|
606
|
+
Name | Type | Description | Example
|
|
607
|
+
--- | --- | --- | ---
|
|
608
|
+
widthPixels | number | Display width in pixels | 1080
|
|
609
|
+
heightPixels | number | Display height in pixels | 1920
|
|
610
|
+
density | number | Display density (logical density factor). This is a scaling factor for the display. | 2.625
|
|
611
|
+
densityDpi | number | Display density in DPI (dots per inch) | 420
|
|
612
|
+
scaledDensity | number | Scaled density factor for fonts. This is typically the same as `density` but may be adjusted by the user's font size preference. | 2.625
|
|
613
|
+
xdpi | number | Exact physical pixels per inch of the screen in the X dimension | 420.0
|
|
614
|
+
ydpi | number | Exact physical pixels per inch of the screen in the Y dimension | 420.0
|
|
615
|
+
|
|
616
|
+
**Example:**
|
|
617
|
+
```python
|
|
618
|
+
# List all displays
|
|
619
|
+
displays = driver.execute_script('mobile: listDisplays')
|
|
620
|
+
|
|
621
|
+
for display in displays:
|
|
622
|
+
print(f"Display ID: {display['id']}")
|
|
623
|
+
print(f" Name: {display['name']}")
|
|
624
|
+
print(f" Physical ID: {display['physicalId']}")
|
|
625
|
+
if display.get('virtualId'):
|
|
626
|
+
print(f" Virtual ID: {display['virtualId']}")
|
|
627
|
+
print(f" Is default: {display['isDefault']}")
|
|
628
|
+
print(f" Size: {display['metrics']['widthPixels']}x{display['metrics']['heightPixels']}")
|
|
629
|
+
print(f" Density: {display['metrics']['density']} ({display['metrics']['densityDpi']} DPI)")
|
|
630
|
+
```
|
|
631
|
+
|
|
527
632
|
### mobile: getDeviceTime
|
|
528
633
|
|
|
529
634
|
Retrieves the current device's timestamp.
|
|
@@ -771,12 +876,28 @@ Verify whether an application is installed on the device under test.
|
|
|
771
876
|
Name | Type | Required | Description | Example
|
|
772
877
|
--- | --- | --- | --- | ---
|
|
773
878
|
appId | string | yes | The identifier of the application package to be checked | `my.app.id`
|
|
774
|
-
user | number or string | no | The user ID for which the package is installed
|
|
879
|
+
user | number or string | no | The user ID for which the package is installed. The `current` user is used by default | 1006
|
|
775
880
|
|
|
776
881
|
#### Returned Result
|
|
777
882
|
|
|
778
883
|
True or false
|
|
779
884
|
|
|
885
|
+
### mobile: listApps
|
|
886
|
+
|
|
887
|
+
Lists all installed packages on the Android device, optionally filtered by user.
|
|
888
|
+
An exception will be thrown on devices running Android API below level 26.
|
|
889
|
+
|
|
890
|
+
#### Arguments
|
|
891
|
+
|
|
892
|
+
Name | Type | Required | Description | Example
|
|
893
|
+
--- | --- | --- | --- | ---
|
|
894
|
+
user | number or string | no | The user ID for which the package is installed. The `current` user is used by default | 1006
|
|
895
|
+
|
|
896
|
+
#### Returned Result
|
|
897
|
+
|
|
898
|
+
A map where keys are packageName and values are maps of platform-specific app properties since UIAutomator2 driver v7.0.0.
|
|
899
|
+
UIAutomator2 driver v6.9.0 and v6.9.1 were a list of installed package names.
|
|
900
|
+
|
|
780
901
|
### mobile: queryAppState
|
|
781
902
|
|
|
782
903
|
Queries the current state of the app.
|
|
@@ -1039,6 +1160,28 @@ Note that `description` in `page` can be an empty string most likely when it com
|
|
|
1039
1160
|
}
|
|
1040
1161
|
```
|
|
1041
1162
|
|
|
1163
|
+
### mobile: getChromeCapabilities
|
|
1164
|
+
|
|
1165
|
+
Retrieves the Chrome capabilities that are being used for the current
|
|
1166
|
+
Chromedriver session. This method is useful for debugging Chrome/webview
|
|
1167
|
+
automation issues and understanding what capabilities are being applied to the
|
|
1168
|
+
Chromedriver instance.
|
|
1169
|
+
|
|
1170
|
+
#### Returned Result
|
|
1171
|
+
|
|
1172
|
+
The extension returns a dictionary containing the Chrome capabilities that are
|
|
1173
|
+
currently being used by the Chromedriver session. The structure of the returned
|
|
1174
|
+
object follows the standard Chrome/Chromium capabilities format and may include
|
|
1175
|
+
properties such as:
|
|
1176
|
+
|
|
1177
|
+
- `browserName`: The name of the browser (typically "chrome")
|
|
1178
|
+
- `browserVersion`: The version of Chrome/Chromium being automated
|
|
1179
|
+
- `platformName`: The platform name
|
|
1180
|
+
- Other standard WebDriver capabilities
|
|
1181
|
+
|
|
1182
|
+
The exact structure and properties may vary depending on
|
|
1183
|
+
the Chrome version and the capabilities that were set during session creation.
|
|
1184
|
+
|
|
1042
1185
|
### mobile: installMultipleApks
|
|
1043
1186
|
|
|
1044
1187
|
Install applications via `install-multiple` option.
|
|
@@ -1271,6 +1414,7 @@ keycode | number | yes | A valid Android key code. See [KeyEvent documentation](
|
|
|
1271
1414
|
metastate | number | no | An integer in which each bit set to 1 represents a pressed meta key. See [KeyEvent documentation](https://developer.android.com/reference/android/view/KeyEvent) for more details. | 0x00000010 (which is META_ALT_LEFT_ON)
|
|
1272
1415
|
flags | number | no | Flags for the particular key event. See [KeyEvent documentation](https://developer.android.com/reference/android/view/KeyEvent) for more details. | 0x00000001 (which is FLAG_WOKE_HERE)
|
|
1273
1416
|
isLongPress | boolean | no | Whether to emulate long key press. `false` by default. | true
|
|
1417
|
+
source | number | no | Input device source. One or more [InputDevice.SOURCE_*](https://developer.android.com/reference/android/view/InputDevice) values (e.g. SOURCE_KEYBOARD, SOURCE_DPAD, SOURCE_GAMEPAD). Default is `257` or `0x101`, which maps to SOURCE_KEYBOARD. Multiple values can be combined using the logical OR operator. | 0x00000101 (SOURCE_KEYBOARD), 0x00000101 | 0x00000201 (SOURCE_KEYBOARD or SOURCE_DPAD)
|
|
1274
1418
|
|
|
1275
1419
|
### mobile: backgroundApp
|
|
1276
1420
|
|
|
@@ -1544,16 +1688,23 @@ These extensions allow to deal with short-living UI elements. Read [the document
|
|
|
1544
1688
|
Retrieves a screenshot of each display available to Android.
|
|
1545
1689
|
This functionality is only supported since Android 10.
|
|
1546
1690
|
|
|
1691
|
+
**Important:** This method uses **physical or virtual display IDs**, which are different from logical display IDs used by the `currentDisplayId` setting. Display IDs can be obtained from:
|
|
1692
|
+
- The `physicalId` or `virtualId` field returned by [`mobile: listDisplays`](#mobile-listdisplays) (recommended)
|
|
1693
|
+
- The `physicalDisplayId` or `virtualDisplayId` field returned by [`mobile: listWindows`](#mobile-listwindows)
|
|
1694
|
+
- The `adb shell dumpsys SurfaceFlinger --display-id` command output
|
|
1695
|
+
|
|
1696
|
+
**Note:** For physical displays, use the `physicalId` from `mobile: listDisplays` or `physicalDisplayId` from `mobile: listWindows`. For virtual displays, use the `virtualId` from `mobile: listDisplays` or `virtualDisplayId` from `mobile: listWindows`.
|
|
1697
|
+
|
|
1547
1698
|
#### Arguments
|
|
1548
1699
|
|
|
1549
1700
|
Name | Type | Required | Description | Example
|
|
1550
1701
|
--- | --- | --- | --- | ---
|
|
1551
|
-
displayId | number or string | no |
|
|
1702
|
+
displayId | number or string | no | **Physical or virtual display identifier** to take a screenshot for. If not provided then screenshots of all displays are going to be returned. If no matches were found then an error is thrown. **Note:** This is a physical or virtual display ID, not a logical display ID. Use `mobile: listDisplays` to get the correct `physicalId` (for physical displays) or `virtualId` (for virtual displays) value. | 1234567890
|
|
1552
1703
|
|
|
1553
1704
|
#### Returns
|
|
1554
1705
|
|
|
1555
|
-
A dictionary where each key is the display identifier and the value has the following keys:
|
|
1556
|
-
- `id`: The
|
|
1706
|
+
A dictionary where each key is the physical or virtual display identifier (as a string) and the value has the following keys:
|
|
1707
|
+
- `id`: The physical or virtual display identifier (same as the key)
|
|
1557
1708
|
- `name`: Display name
|
|
1558
1709
|
- `isDefault`: Whether this display is the default one
|
|
1559
1710
|
- `payload`: The actual PNG screenshot data encoded to base64 string
|
|
@@ -1673,6 +1824,7 @@ action | string | yes | The action to execute on the NFC adapter. The following
|
|
|
1673
1824
|
|
|
1674
1825
|
UiAutomator2 driver supports Appium endpoints for applications management:
|
|
1675
1826
|
- Check if app is installed ([mobile: isAppInstalled](#mobile-isappinstalled))
|
|
1827
|
+
- Lists all installed packages ([mobile: listApps](#mobile-listapps))
|
|
1676
1828
|
- Install/upgrade app ([mobile: installApp](#mobile-installapp))
|
|
1677
1829
|
- Activate app ([mobile: activateApp](#mobile-activateapp))
|
|
1678
1830
|
- Since UIAutomator2 driver v2.2.0, the server calls `am start`/`am start-activity` to start the application on devices with API level 24+. [monkey](https://developer.android.com/studio/test/other-testing-tools/monkey) tool is called on devices below API level 24.
|
|
@@ -1733,6 +1885,7 @@ The following endpoints are used to control the current context:
|
|
|
1733
1885
|
- GET `/session/:sessionId/context`: To retrieve the name of the current context
|
|
1734
1886
|
- GET `/session/:sessionId/contexts`: To retrieve the list of available context names
|
|
1735
1887
|
- [mobile: getContexts](#mobile-getcontexts)
|
|
1888
|
+
- [mobile: getChromeCapabilities](#mobile-getchromecapabilities)
|
|
1736
1889
|
|
|
1737
1890
|
By default, the driver starts in the native context, which means that most of REST API commands are being
|
|
1738
1891
|
forwarded to the downstream [appium-uiautomator2-server](https://github.com/appium/appium-uiautomator2-server).
|
|
@@ -1824,7 +1977,7 @@ in it. The contents of the file needs to be parsable as a JSON object, like:
|
|
|
1824
1977
|
}
|
|
1825
1978
|
```
|
|
1826
1979
|
|
|
1827
|
-
There is a possibility to automatically download the necessary chromedriver(s) into `appium:chromedriverExecutableDir` from the official Google storage. The script will automatically search for the newest chromedriver version that supports the given browser/web view, download it (the hash sum is verified as well for the downloaded archive) and add to the `appium:chromedriverChromeMappingFile` mapping. Everything, which is needed to be done from your side is to execute the server with `chromedriver_autodownload` feature enabled (like `appium server --allow-insecure chromedriver_autodownload`).
|
|
1980
|
+
There is a possibility to automatically download the necessary chromedriver(s) into `appium:chromedriverExecutableDir` from the official Google storage. The script will automatically search for the newest chromedriver version that supports the given browser/web view, download it (the hash sum is verified as well for the downloaded archive) and add to the `appium:chromedriverChromeMappingFile` mapping. Everything, which is needed to be done from your side is to execute the server with `uiautomator2:chromedriver_autodownload` feature enabled (like `appium server --allow-insecure uiautomator2:chromedriver_autodownload`).
|
|
1828
1981
|
|
|
1829
1982
|
### Troubleshooting Chromedriver Download Issues
|
|
1830
1983
|
|