appium-uiautomator2-driver 3.10.0 → 4.0.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.
Files changed (73) hide show
  1. package/CHANGELOG.md +69 -0
  2. package/README.md +19 -1
  3. package/build/lib/commands/actions.d.ts +13 -7
  4. package/build/lib/commands/actions.d.ts.map +1 -1
  5. package/build/lib/commands/actions.js +24 -10
  6. package/build/lib/commands/actions.js.map +1 -1
  7. package/build/lib/commands/alert.d.ts +8 -4
  8. package/build/lib/commands/alert.d.ts.map +1 -1
  9. package/build/lib/commands/alert.js +10 -6
  10. package/build/lib/commands/alert.js.map +1 -1
  11. package/build/lib/commands/app-management.d.ts +10 -6
  12. package/build/lib/commands/app-management.d.ts.map +1 -1
  13. package/build/lib/commands/app-management.js +13 -10
  14. package/build/lib/commands/app-management.js.map +1 -1
  15. package/build/lib/commands/clipboard.d.ts +0 -12
  16. package/build/lib/commands/clipboard.d.ts.map +1 -1
  17. package/build/lib/commands/clipboard.js +0 -18
  18. package/build/lib/commands/clipboard.js.map +1 -1
  19. package/build/lib/commands/element.d.ts +3 -2
  20. package/build/lib/commands/element.d.ts.map +1 -1
  21. package/build/lib/commands/element.js +3 -4
  22. package/build/lib/commands/element.js.map +1 -1
  23. package/build/lib/commands/gestures.d.ts +130 -22
  24. package/build/lib/commands/gestures.d.ts.map +1 -1
  25. package/build/lib/commands/gestures.js +130 -33
  26. package/build/lib/commands/gestures.js.map +1 -1
  27. package/build/lib/commands/keyboard.d.ts +11 -4
  28. package/build/lib/commands/keyboard.d.ts.map +1 -1
  29. package/build/lib/commands/keyboard.js +13 -7
  30. package/build/lib/commands/keyboard.js.map +1 -1
  31. package/build/lib/commands/navigation.d.ts +5 -2
  32. package/build/lib/commands/navigation.d.ts.map +1 -1
  33. package/build/lib/commands/navigation.js +5 -3
  34. package/build/lib/commands/navigation.js.map +1 -1
  35. package/build/lib/commands/screenshot.d.ts +4 -2
  36. package/build/lib/commands/screenshot.d.ts.map +1 -1
  37. package/build/lib/commands/screenshot.js +4 -3
  38. package/build/lib/commands/screenshot.js.map +1 -1
  39. package/build/lib/commands/types.d.ts +0 -387
  40. package/build/lib/commands/types.d.ts.map +1 -1
  41. package/build/lib/driver.d.ts +540 -8
  42. package/build/lib/driver.d.ts.map +1 -1
  43. package/build/lib/driver.js +2 -7
  44. package/build/lib/driver.js.map +1 -1
  45. package/build/lib/execute-method-map.d.ts +540 -0
  46. package/build/lib/execute-method-map.d.ts.map +1 -0
  47. package/build/lib/execute-method-map.js +257 -0
  48. package/build/lib/execute-method-map.js.map +1 -0
  49. package/build/tsconfig.tsbuildinfo +1 -1
  50. package/lib/commands/actions.js +32 -10
  51. package/lib/commands/alert.js +10 -6
  52. package/lib/commands/app-management.js +14 -11
  53. package/lib/commands/clipboard.js +0 -18
  54. package/lib/commands/element.js +3 -4
  55. package/lib/commands/gestures.js +184 -38
  56. package/lib/commands/keyboard.js +13 -8
  57. package/lib/commands/navigation.js +5 -3
  58. package/lib/commands/screenshot.js +4 -3
  59. package/lib/commands/types.ts +0 -406
  60. package/lib/driver.ts +2 -16
  61. package/lib/execute-method-map.ts +269 -0
  62. package/npm-shrinkwrap.json +41 -48
  63. package/package.json +3 -3
  64. package/build/lib/commands/app-strings.d.ts +0 -12
  65. package/build/lib/commands/app-strings.d.ts.map +0 -1
  66. package/build/lib/commands/app-strings.js +0 -19
  67. package/build/lib/commands/app-strings.js.map +0 -1
  68. package/build/lib/commands/execute.d.ts +0 -15
  69. package/build/lib/commands/execute.d.ts.map +0 -1
  70. package/build/lib/commands/execute.js +0 -83
  71. package/build/lib/commands/execute.js.map +0 -1
  72. package/lib/commands/app-strings.js +0 -16
  73. package/lib/commands/execute.js +0 -93
@@ -0,0 +1,269 @@
1
+ import { ExecuteMethodMap } from '@appium/types';
2
+ import { AndroidDriver } from 'appium-android-driver';
3
+
4
+ export const executeMethodMap = {
5
+ ...AndroidDriver.executeMethodMap,
6
+
7
+ 'mobile: dragGesture': {
8
+ command: 'mobileDragGesture',
9
+ params: {
10
+ optional: [
11
+ 'elementId',
12
+ 'startX',
13
+ 'startY',
14
+ 'endX',
15
+ 'endY',
16
+ 'speed',
17
+ ],
18
+ },
19
+ },
20
+ 'mobile: flingGesture': {
21
+ command: 'mobileFlingGesture',
22
+ params: {
23
+ required: [
24
+ 'direction',
25
+ ],
26
+ optional: [
27
+ 'elementId',
28
+ 'left',
29
+ 'top',
30
+ 'width',
31
+ 'height',
32
+ 'speed',
33
+ ],
34
+ },
35
+ },
36
+ 'mobile: doubleClickGesture': {
37
+ command: 'mobileDoubleClickGesture',
38
+ params: {
39
+ optional: [
40
+ 'elementId',
41
+ 'x',
42
+ 'y',
43
+ ],
44
+ },
45
+ },
46
+ 'mobile: clickGesture': {
47
+ command: 'mobileClickGesture',
48
+ params: {
49
+ optional: [
50
+ 'elementId',
51
+ 'x',
52
+ 'y',
53
+ ],
54
+ },
55
+ },
56
+ 'mobile: longClickGesture': {
57
+ command: 'mobileLongClickGesture',
58
+ params: {
59
+ optional: [
60
+ 'elementId',
61
+ 'x',
62
+ 'y',
63
+ 'duration',
64
+ ],
65
+ },
66
+ },
67
+ 'mobile: pinchCloseGesture': {
68
+ command: 'mobilePinchCloseGesture',
69
+ params: {
70
+ required: [
71
+ 'percent',
72
+ ],
73
+ optional: [
74
+ 'elementId',
75
+ 'left',
76
+ 'top',
77
+ 'width',
78
+ 'height',
79
+ 'speed',
80
+ ],
81
+ },
82
+ },
83
+ 'mobile: pinchOpenGesture': {
84
+ command: 'mobilePinchOpenGesture',
85
+ params: {
86
+ required: [
87
+ 'percent',
88
+ ],
89
+ optional: [
90
+ 'elementId',
91
+ 'left',
92
+ 'top',
93
+ 'width',
94
+ 'height',
95
+ 'speed',
96
+ ],
97
+ },
98
+ },
99
+ 'mobile: swipeGesture': {
100
+ command: 'mobileSwipeGesture',
101
+ params: {
102
+ required: [
103
+ 'direction',
104
+ 'percent',
105
+ ],
106
+ optional: [
107
+ 'elementId',
108
+ 'left',
109
+ 'top',
110
+ 'width',
111
+ 'height',
112
+ 'speed',
113
+ ],
114
+ },
115
+ },
116
+ 'mobile: scrollGesture': {
117
+ command: 'mobileScrollGesture',
118
+ params: {
119
+ required: [
120
+ 'direction',
121
+ 'percent',
122
+ ],
123
+ optional: [
124
+ 'elementId',
125
+ 'left',
126
+ 'top',
127
+ 'width',
128
+ 'height',
129
+ 'speed',
130
+ ],
131
+ },
132
+ },
133
+ 'mobile: scrollBackTo': {
134
+ command: 'mobileScrollBackTo',
135
+ params: {
136
+ required: [
137
+ 'elementId',
138
+ 'elementToId',
139
+ ],
140
+ },
141
+ },
142
+ 'mobile: scroll': {
143
+ command: 'mobileScroll',
144
+ params: {
145
+ required: [
146
+ 'strategy',
147
+ 'selector',
148
+ ],
149
+ optional: [
150
+ 'elementId',
151
+ 'maxSwipes',
152
+ ],
153
+ },
154
+ },
155
+
156
+ 'mobile: viewportScreenshot': {
157
+ command: 'mobileViewportScreenshot',
158
+ },
159
+ 'mobile: viewportRect': {
160
+ command: 'mobileViewPortRect',
161
+ },
162
+
163
+ 'mobile: deepLink': {
164
+ command: 'mobileDeepLink',
165
+ params: {
166
+ required: ['url'],
167
+ optional: ['package', 'waitForLaunch'],
168
+ }
169
+ },
170
+
171
+ 'mobile: acceptAlert': {
172
+ command: 'mobileAcceptAlert',
173
+ params: {
174
+ optional: ['buttonLabel'],
175
+ }
176
+ },
177
+ 'mobile: dismissAlert': {
178
+ command: 'mobileDismissAlert',
179
+ params: {
180
+ optional: ['buttonLabel'],
181
+ }
182
+ },
183
+
184
+ 'mobile: batteryInfo': {
185
+ command: 'mobileGetBatteryInfo',
186
+ },
187
+
188
+ 'mobile: deviceInfo': {
189
+ command: 'mobileGetDeviceInfo',
190
+ },
191
+
192
+ 'mobile: openNotifications': {
193
+ command: 'openNotifications',
194
+ },
195
+
196
+ 'mobile: type': {
197
+ command: 'mobileType',
198
+ params: {
199
+ required: ['text'],
200
+ }
201
+ },
202
+ 'mobile: replaceElementValue': {
203
+ command: 'mobileReplaceElementValue',
204
+ params: {
205
+ required: ['elementId', 'text'],
206
+ }
207
+ },
208
+
209
+ 'mobile: installMultipleApks': {
210
+ command: 'mobileInstallMultipleApks',
211
+ params: {
212
+ required: ['apks'],
213
+ optional: ['options'],
214
+ }
215
+ },
216
+
217
+ 'mobile: backgroundApp': {
218
+ command: 'mobileBackgroundApp',
219
+ params: {
220
+ optional: ['seconds'],
221
+ }
222
+ },
223
+
224
+ 'mobile: pressKey': {
225
+ command: 'mobilePressKey',
226
+ params: {
227
+ required: ['keycode'],
228
+ optional: ['metastate', 'flags', 'isLongPress'],
229
+ }
230
+ },
231
+
232
+ 'mobile: screenshots': {
233
+ command: 'mobileScreenshots',
234
+ params: {
235
+ optional: ['displayId'],
236
+ }
237
+ },
238
+
239
+ 'mobile: scheduleAction': {
240
+ command: 'mobileScheduleAction',
241
+ params: {
242
+ required: ['name', 'steps'],
243
+ optional: ['maxPass', 'maxFail', 'times', 'intervalMs', 'maxHistoryItems'],
244
+ }
245
+ },
246
+ 'mobile: getActionHistory': {
247
+ command: 'mobileGetActionHistory',
248
+ params: {
249
+ required: ['name'],
250
+ }
251
+ },
252
+ 'mobile: unscheduleAction': {
253
+ command: 'mobileUnscheduleAction',
254
+ params: {
255
+ required: ['name'],
256
+ }
257
+ },
258
+
259
+ 'mobile: setClipboard': {
260
+ command: 'setClipboard',
261
+ params: {
262
+ required: ['content'],
263
+ optional: ['contentType', 'label'],
264
+ }
265
+ },
266
+ 'mobile: getClipboard': {
267
+ command: 'getClipboard',
268
+ },
269
+ } as const satisfies ExecuteMethodMap<any>;
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "appium-uiautomator2-driver",
3
- "version": "3.10.0",
3
+ "version": "4.0.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "appium-uiautomator2-driver",
9
- "version": "3.10.0",
9
+ "version": "4.0.1",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
12
  "appium-adb": "^12.12.0",
13
- "appium-android-driver": "^9.15.0",
14
- "appium-uiautomator2-server": "^7.0.24",
13
+ "appium-android-driver": "^10.1.0",
14
+ "appium-uiautomator2-server": "^7.2.0",
15
15
  "asyncbox": "^3.0.0",
16
16
  "axios": "^1.6.5",
17
17
  "bluebird": "^3.5.1",
@@ -107,6 +107,12 @@
107
107
  "spdy": "4.0.2"
108
108
  }
109
109
  },
110
+ "node_modules/@appium/base-driver/node_modules/@types/lodash": {
111
+ "version": "4.17.14",
112
+ "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.14.tgz",
113
+ "integrity": "sha512-jsxagdikDiDBeIRaPYtArcT8my4tN1og7MtMRquFT3XNA6axxyHDRUemqDz/taRDdOUn0GnGHRCuff4q48sW9A==",
114
+ "license": "MIT"
115
+ },
110
116
  "node_modules/@appium/base-driver/node_modules/type-fest": {
111
117
  "version": "4.31.0",
112
118
  "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.31.0.tgz",
@@ -596,9 +602,9 @@
596
602
  }
597
603
  },
598
604
  "node_modules/@types/express-serve-static-core": {
599
- "version": "5.0.5",
600
- "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-5.0.5.tgz",
601
- "integrity": "sha512-GLZPrd9ckqEBFMcVM/qRFAP0Hg3qiVEojgEFsx/N/zKXsBzbGF6z5FBDpZ0+Xhp1xr+qRZYjfGr1cWHB9oFHSA==",
605
+ "version": "5.0.6",
606
+ "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-5.0.6.tgz",
607
+ "integrity": "sha512-3xhRnjJPkULekpSzgtoNYYcTWgEZkp4myc+Saevii5JPnHNvHMRlBSHDbs7Bh1iPPoVTERHEZXyhyLbMEsExsA==",
602
608
  "license": "MIT",
603
609
  "dependencies": {
604
610
  "@types/node": "*",
@@ -649,12 +655,6 @@
649
655
  "integrity": "sha512-Q8oFIHJHr+htLrTXN2FuZfg+WXVHQRwU/hC2GpUu+Q8e3FUM9EDkS2pE3R2AO1ZGu56f479ybdMCNF1DAu8cAQ==",
650
656
  "license": "MIT"
651
657
  },
652
- "node_modules/@types/lodash": {
653
- "version": "4.17.14",
654
- "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.14.tgz",
655
- "integrity": "sha512-jsxagdikDiDBeIRaPYtArcT8my4tN1og7MtMRquFT3XNA6axxyHDRUemqDz/taRDdOUn0GnGHRCuff4q48sW9A==",
656
- "license": "MIT"
657
- },
658
658
  "node_modules/@types/method-override": {
659
659
  "version": "3.0.0",
660
660
  "resolved": "https://registry.npmjs.org/@types/method-override/-/method-override-3.0.0.tgz",
@@ -686,9 +686,9 @@
686
686
  }
687
687
  },
688
688
  "node_modules/@types/node": {
689
- "version": "22.10.10",
690
- "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.10.tgz",
691
- "integrity": "sha512-X47y/mPNzxviAGY5TcYPtYL8JsY3kAq2n8fMmKoRCxq/c4v4pyGNCzM2R6+M5/umG4ZfHuT+sgqDYqWc9rJ6ww==",
689
+ "version": "22.13.1",
690
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.1.tgz",
691
+ "integrity": "sha512-jK8uzQlrvXqEU91UxiK5J7pKHyzgnI1Qnl0QDHIgVGuolJhRb9EEl28Cj9b3rGR8B2lhFCtvIm5os8lFnO/1Ew==",
692
692
  "license": "MIT",
693
693
  "dependencies": {
694
694
  "undici-types": "~6.20.0"
@@ -954,9 +954,9 @@
954
954
  }
955
955
  },
956
956
  "node_modules/appium-adb": {
957
- "version": "12.12.0",
958
- "resolved": "https://registry.npmjs.org/appium-adb/-/appium-adb-12.12.0.tgz",
959
- "integrity": "sha512-i6cluDIcScQK1rl+/nKqh88nVgaLW5UjVOhC2BbprGwdK6Qr7aO2ay3VKD7CWCzv7Cbmc3sLkcJh3Kx54ahO6w==",
957
+ "version": "12.12.1",
958
+ "resolved": "https://registry.npmjs.org/appium-adb/-/appium-adb-12.12.1.tgz",
959
+ "integrity": "sha512-CgdvLBBtLkZeObJegsCQo2eUTzuHESkeewbfWROFNtrVmxKS30J9y9YV4h5WIYJbyhgQCJeX+yDa+1gO/ejFjA==",
960
960
  "license": "Apache-2.0",
961
961
  "dependencies": {
962
962
  "@appium/support": "^6.0.0",
@@ -976,15 +976,15 @@
976
976
  }
977
977
  },
978
978
  "node_modules/appium-android-driver": {
979
- "version": "9.15.0",
980
- "resolved": "https://registry.npmjs.org/appium-android-driver/-/appium-android-driver-9.15.0.tgz",
981
- "integrity": "sha512-j4DNdk0hD74LkAgT82eqfJNVwINnKRdGnV3xrb6rJ25U+ZWX94v4/xkeOA4SPslQ5MnbHI+fXypk+gMeKf3PHw==",
979
+ "version": "10.1.0",
980
+ "resolved": "https://registry.npmjs.org/appium-android-driver/-/appium-android-driver-10.1.0.tgz",
981
+ "integrity": "sha512-wnPr+DODpJ9j+o2RwUyodJSQXk00ah39gO7eQavn0c8fVX5KV+tNmxyyxmOFlbB145DnhmDuKJ2HgWEn6r5bNQ==",
982
982
  "license": "Apache-2.0",
983
983
  "dependencies": {
984
984
  "@appium/support": "^6.0.0",
985
985
  "@colors/colors": "^1.6.0",
986
986
  "appium-adb": "^12.12.0",
987
- "appium-chromedriver": "^6.0.1",
987
+ "appium-chromedriver": "^7.0.0",
988
988
  "asyncbox": "^3.0.0",
989
989
  "axios": "^1.x",
990
990
  "bluebird": "^3.4.7",
@@ -1009,9 +1009,9 @@
1009
1009
  }
1010
1010
  },
1011
1011
  "node_modules/appium-chromedriver": {
1012
- "version": "6.1.16",
1013
- "resolved": "https://registry.npmjs.org/appium-chromedriver/-/appium-chromedriver-6.1.16.tgz",
1014
- "integrity": "sha512-DdOtZSESbNHkjOAqfCnUCZAmxoh7ABuvez4fIl3VCBbv09FQke2x1IX4rdu1KIBM2lkQCrgkhRm94L4eR1v2XA==",
1012
+ "version": "7.0.2",
1013
+ "resolved": "https://registry.npmjs.org/appium-chromedriver/-/appium-chromedriver-7.0.2.tgz",
1014
+ "integrity": "sha512-3f/IzwlmjmG6AcfXctnwhg6tncDx6LRcBqVUTLAoXWyTp9OtP1bjDLhU5g2/s0mcsArMkemN6tVSNeSu2hpRbQ==",
1015
1015
  "license": "Apache-2.0",
1016
1016
  "dependencies": {
1017
1017
  "@appium/base-driver": "^9.1.0",
@@ -1034,9 +1034,9 @@
1034
1034
  }
1035
1035
  },
1036
1036
  "node_modules/appium-uiautomator2-server": {
1037
- "version": "7.1.11",
1038
- "resolved": "https://registry.npmjs.org/appium-uiautomator2-server/-/appium-uiautomator2-server-7.1.11.tgz",
1039
- "integrity": "sha512-vAv6Dr8/RLJfP/4CVhBGVWuVanbR29rcy/u3u9Gt4tul/CsjHUx0JGfTk2hCMDpLvHYHirskoUkB/cvPDG6fJQ==",
1037
+ "version": "7.2.3",
1038
+ "resolved": "https://registry.npmjs.org/appium-uiautomator2-server/-/appium-uiautomator2-server-7.2.3.tgz",
1039
+ "integrity": "sha512-PgYxwqLKfMRFIN2bqmpmH7U4wZEHDpd8WUyexfVF9cParSSIwhE3coXRfZLsUWgvrEBSXuS+A+6NIY7Ra7dlUA==",
1040
1040
  "license": "Apache-2.0",
1041
1041
  "engines": {
1042
1042
  "node": ">=14",
@@ -3124,9 +3124,9 @@
3124
3124
  }
3125
3125
  },
3126
3126
  "node_modules/moment-timezone": {
3127
- "version": "0.5.46",
3128
- "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.46.tgz",
3129
- "integrity": "sha512-ZXm9b36esbe7OmdABqIWJuBBiLLwAjrN7CE+7sYdCCx82Nabt1wHDj8TVseS59QIlfFPbOoiBPm6ca9BioG4hw==",
3127
+ "version": "0.5.47",
3128
+ "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.47.tgz",
3129
+ "integrity": "sha512-UbNt/JAWS0m/NJOebR0QMRHBk0hu03r5dx9GK8Cs0AS3I81yDcOc9k+DytPItgVvBP7J6Mf6U2n3BPAacAV9oA==",
3130
3130
  "license": "MIT",
3131
3131
  "dependencies": {
3132
3132
  "moment": "^2.29.4"
@@ -3277,9 +3277,9 @@
3277
3277
  }
3278
3278
  },
3279
3279
  "node_modules/object-inspect": {
3280
- "version": "1.13.3",
3281
- "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.3.tgz",
3282
- "integrity": "sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==",
3280
+ "version": "1.13.4",
3281
+ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz",
3282
+ "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==",
3283
3283
  "license": "MIT",
3284
3284
  "engines": {
3285
3285
  "node": ">= 0.4"
@@ -3668,12 +3668,6 @@
3668
3668
  "url": "https://github.com/sponsors/ljharb"
3669
3669
  }
3670
3670
  },
3671
- "node_modules/queue-tick": {
3672
- "version": "1.0.1",
3673
- "resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz",
3674
- "integrity": "sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==",
3675
- "license": "MIT"
3676
- },
3677
3671
  "node_modules/range-parser": {
3678
3672
  "version": "1.2.1",
3679
3673
  "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
@@ -4332,13 +4326,12 @@
4332
4326
  }
4333
4327
  },
4334
4328
  "node_modules/streamx": {
4335
- "version": "2.21.1",
4336
- "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.21.1.tgz",
4337
- "integrity": "sha512-PhP9wUnFLa+91CPy3N6tiQsK+gnYyUNuk15S3YG/zjYE7RuPeCjJngqnzpC31ow0lzBHQ+QGO4cNJnd0djYUsw==",
4329
+ "version": "2.22.0",
4330
+ "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.22.0.tgz",
4331
+ "integrity": "sha512-sLh1evHOzBy/iWRiR6d1zRcLao4gGZr3C1kzNz4fopCOKJb6xD9ub8Mpi9Mr1R6id5o43S+d93fI48UC5uM9aw==",
4338
4332
  "license": "MIT",
4339
4333
  "dependencies": {
4340
4334
  "fast-fifo": "^1.3.2",
4341
- "queue-tick": "^1.0.1",
4342
4335
  "text-decoder": "^1.1.0"
4343
4336
  },
4344
4337
  "optionalDependencies": {
@@ -4559,9 +4552,9 @@
4559
4552
  "license": "0BSD"
4560
4553
  },
4561
4554
  "node_modules/type-fest": {
4562
- "version": "4.33.0",
4563
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.33.0.tgz",
4564
- "integrity": "sha512-s6zVrxuyKbbAsSAD5ZPTB77q4YIdRctkTbJ2/Dqlinwz+8ooH2gd+YA7VA6Pa93KML9GockVvoxjZ2vHP+mu8g==",
4555
+ "version": "4.34.1",
4556
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.34.1.tgz",
4557
+ "integrity": "sha512-6kSc32kT0rbwxD6QL1CYe8IqdzN/J/ILMrNK+HMQCKH3insCDRY/3ITb0vcBss0a3t72fzh2YSzj8ko1HgwT3g==",
4565
4558
  "license": "(MIT OR CC0-1.0)",
4566
4559
  "engines": {
4567
4560
  "node": ">=16"
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "automated testing",
8
8
  "android"
9
9
  ],
10
- "version": "3.10.0",
10
+ "version": "4.0.1",
11
11
  "bugs": {
12
12
  "url": "https://github.com/appium/appium-uiautomator2-driver/issues"
13
13
  },
@@ -57,8 +57,8 @@
57
57
  },
58
58
  "dependencies": {
59
59
  "appium-adb": "^12.12.0",
60
- "appium-android-driver": "^9.15.0",
61
- "appium-uiautomator2-server": "^7.0.24",
60
+ "appium-android-driver": "^10.1.0",
61
+ "appium-uiautomator2-server": "^7.2.0",
62
62
  "asyncbox": "^3.0.0",
63
63
  "axios": "^1.6.5",
64
64
  "bluebird": "^3.5.1",
@@ -1,12 +0,0 @@
1
- /**
2
- * Retrives app strings from its resources for the given language
3
- * or the default device language.
4
- * @this {AndroidUiautomator2Driver}
5
- * @param {import('./types').GetAppStringsOptions} [opts={}]
6
- * @returns {Promise<StringRecord>}
7
- */
8
- export function mobileGetAppStrings(this: import("../driver").AndroidUiautomator2Driver, opts?: import("./types").GetAppStringsOptions): Promise<StringRecord>;
9
- export type ADB = import("appium-adb").ADB;
10
- export type StringRecord = import("@appium/types").StringRecord;
11
- export type AndroidUiautomator2Driver = import("../driver").AndroidUiautomator2Driver;
12
- //# sourceMappingURL=app-strings.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app-strings.d.ts","sourceRoot":"","sources":["../../../lib/commands/app-strings.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,gGAHW,OAAO,SAAS,EAAE,oBAAoB,GACpC,OAAO,CAAC,YAAY,CAAC,CAIjC;kBAGY,OAAO,YAAY,EAAE,GAAG;2BACxB,OAAO,eAAe,EAAE,YAAY;wCACpC,OAAO,WAAW,EAAE,yBAAyB"}
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.mobileGetAppStrings = mobileGetAppStrings;
4
- /**
5
- * Retrives app strings from its resources for the given language
6
- * or the default device language.
7
- * @this {AndroidUiautomator2Driver}
8
- * @param {import('./types').GetAppStringsOptions} [opts={}]
9
- * @returns {Promise<StringRecord>}
10
- */
11
- async function mobileGetAppStrings(opts) {
12
- return await this.getStrings(opts?.language);
13
- }
14
- /**
15
- * @typedef {import('appium-adb').ADB} ADB
16
- * @typedef {import('@appium/types').StringRecord} StringRecord
17
- * @typedef {import('../driver').AndroidUiautomator2Driver} AndroidUiautomator2Driver
18
- */
19
- //# sourceMappingURL=app-strings.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app-strings.js","sourceRoot":"","sources":["../../../lib/commands/app-strings.js"],"names":[],"mappings":";;AAOA,kDAEC;AATD;;;;;;GAMG;AACI,KAAK,UAAU,mBAAmB,CAAC,IAAI;IAC5C,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC/C,CAAC;AAED;;;;GAIG"}
@@ -1,15 +0,0 @@
1
- /**
2
- * @this {AndroidUiautomator2Driver}
3
- * @returns {import('@appium/types').StringRecord<string>}
4
- */
5
- export function mobileCommandsMapping(this: import("../driver").AndroidUiautomator2Driver): import("@appium/types").StringRecord<string>;
6
- /**
7
- * @override
8
- * @this {AndroidUiautomator2Driver}
9
- * @param {string} mobileCommand
10
- * @param {import('@appium/types').StringRecord} [opts={}]
11
- * @returns {Promise<any>}
12
- */
13
- export function executeMobile(this: import("../driver").AndroidUiautomator2Driver, mobileCommand: string, opts?: import("@appium/types").StringRecord): Promise<any>;
14
- export type AndroidUiautomator2Driver = import("../driver").AndroidUiautomator2Driver;
15
- //# sourceMappingURL=execute.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"execute.d.ts","sourceRoot":"","sources":["../../../lib/commands/execute.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH,4FAFa,OAAO,eAAe,EAAE,YAAY,CAAC,MAAM,CAAC,CAkDxD;AAED;;;;;;GAMG;AACH,kGAJW,MAAM,SACN,OAAO,eAAe,EAAE,YAAY,GAClC,OAAO,CAAC,GAAG,CAAC,CAIxB;wCAyBY,OAAO,WAAW,EAAE,yBAAyB"}
@@ -1,83 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.mobileCommandsMapping = mobileCommandsMapping;
7
- exports.executeMobile = executeMobile;
8
- const lodash_1 = __importDefault(require("lodash"));
9
- const appium_android_driver_1 = require("appium-android-driver");
10
- /**
11
- * @this {AndroidUiautomator2Driver}
12
- * @returns {import('@appium/types').StringRecord<string>}
13
- */
14
- function mobileCommandsMapping() {
15
- const commonMapping = new appium_android_driver_1.AndroidDriver().mobileCommandsMapping.call(this);
16
- return {
17
- ...commonMapping,
18
- dragGesture: 'mobileDragGesture',
19
- flingGesture: 'mobileFlingGesture',
20
- doubleClickGesture: 'mobileDoubleClickGesture',
21
- clickGesture: 'mobileClickGesture',
22
- longClickGesture: 'mobileLongClickGesture',
23
- pinchCloseGesture: 'mobilePinchCloseGesture',
24
- pinchOpenGesture: 'mobilePinchOpenGesture',
25
- swipeGesture: 'mobileSwipeGesture',
26
- scrollGesture: 'mobileScrollGesture',
27
- scrollBackTo: 'mobileScrollBackTo',
28
- scroll: 'mobileScroll',
29
- viewportScreenshot: 'mobileViewportScreenshot',
30
- viewportRect: 'mobileViewPortRect',
31
- deepLink: 'mobileDeepLink',
32
- acceptAlert: 'mobileAcceptAlert',
33
- dismissAlert: 'mobileDismissAlert',
34
- batteryInfo: 'mobileGetBatteryInfo',
35
- deviceInfo: 'mobileGetDeviceInfo',
36
- openNotifications: 'openNotifications',
37
- type: 'mobileType',
38
- replaceElementValue: 'mobileReplaceElementValue',
39
- getAppStrings: 'mobileGetAppStrings',
40
- installMultipleApks: 'mobileInstallMultipleApks',
41
- backgroundApp: 'mobileBackgroundApp',
42
- pressKey: 'mobilePressKey',
43
- screenshots: 'mobileScreenshots',
44
- scheduleAction: 'mobileScheduleAction',
45
- getActionHistory: 'mobileGetActionHistory',
46
- unscheduleAction: 'mobileUnscheduleAction',
47
- setClipboard: 'mobileSetClipboard',
48
- getClipboard: 'mobileGetClipboard',
49
- };
50
- }
51
- /**
52
- * @override
53
- * @this {AndroidUiautomator2Driver}
54
- * @param {string} mobileCommand
55
- * @param {import('@appium/types').StringRecord} [opts={}]
56
- * @returns {Promise<any>}
57
- */
58
- async function executeMobile(mobileCommand, opts = {}) {
59
- return await new appium_android_driver_1.AndroidDriver().executeMobile.call(this, mobileCommand, preprocessOptions(opts));
60
- }
61
- // #region Internal Helpers
62
- /**
63
- * Renames the deprecated `element` key to `elementId`. Historically,
64
- * all of the pre-Execute-Method-Map execute methods accepted an `element` _or_ and `elementId` param.
65
- * This assigns the `element` value to `elementId` if `elementId` is not already present.
66
- *
67
- * @param {import('@appium/types').StringRecord} [opts={}]
68
- * @internal
69
- * @returns {import('@appium/types').StringRecord|undefined}
70
- */
71
- function preprocessOptions(opts = {}) {
72
- if (lodash_1.default.isPlainObject(opts) && !('elementId' in opts) && 'element' in opts) {
73
- opts.elementId = opts.element;
74
- delete opts.element;
75
- this.log.debug(`Replaced the obsolete 'element' key with 'elementId'`);
76
- }
77
- return opts;
78
- }
79
- // #endregion
80
- /**
81
- * @typedef {import('../driver').AndroidUiautomator2Driver} AndroidUiautomator2Driver
82
- */
83
- //# sourceMappingURL=execute.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../lib/commands/execute.js"],"names":[],"mappings":";;;;;AAOA,sDAgDC;AASD,sCAEC;AAlED,oDAAuB;AACvB,iEAAoD;AAEpD;;;GAGG;AACH,SAAgB,qBAAqB;IACnC,MAAM,aAAa,GAAG,IAAI,qCAAa,EAAE,CAAC,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3E,OAAO;QACL,GAAG,aAAa;QAChB,WAAW,EAAE,mBAAmB;QAChC,YAAY,EAAE,oBAAoB;QAClC,kBAAkB,EAAE,0BAA0B;QAC9C,YAAY,EAAE,oBAAoB;QAClC,gBAAgB,EAAE,wBAAwB;QAC1C,iBAAiB,EAAE,yBAAyB;QAC5C,gBAAgB,EAAE,wBAAwB;QAC1C,YAAY,EAAE,oBAAoB;QAClC,aAAa,EAAE,qBAAqB;QACpC,YAAY,EAAE,oBAAoB;QAClC,MAAM,EAAE,cAAc;QACtB,kBAAkB,EAAE,0BAA0B;QAC9C,YAAY,EAAE,oBAAoB;QAElC,QAAQ,EAAE,gBAAgB;QAE1B,WAAW,EAAE,mBAAmB;QAChC,YAAY,EAAE,oBAAoB;QAElC,WAAW,EAAE,sBAAsB;QAEnC,UAAU,EAAE,qBAAqB;QAEjC,iBAAiB,EAAE,mBAAmB;QAEtC,IAAI,EAAE,YAAY;QAClB,mBAAmB,EAAE,2BAA2B;QAEhD,aAAa,EAAE,qBAAqB;QAEpC,mBAAmB,EAAE,2BAA2B;QAChD,aAAa,EAAE,qBAAqB;QAEpC,QAAQ,EAAE,gBAAgB;QAE1B,WAAW,EAAE,mBAAmB;QAEhC,cAAc,EAAE,sBAAsB;QACtC,gBAAgB,EAAE,wBAAwB;QAC1C,gBAAgB,EAAE,wBAAwB;QAE1C,YAAY,EAAE,oBAAoB;QAClC,YAAY,EAAE,oBAAoB;KACnC,CAAC;AACJ,CAAC;AAED;;;;;;GAMG;AACI,KAAK,UAAU,aAAa,CAAC,aAAa,EAAE,IAAI,GAAG,EAAE;IAC1D,OAAO,MAAM,IAAI,qCAAa,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,EAAE,aAAa,EAAE,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC;AACpG,CAAC;AAED,2BAA2B;AAE3B;;;;;;;;GAQG;AACH,SAAS,iBAAiB,CAAC,IAAI,GAAG,EAAE;IAClC,IAAI,gBAAC,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,IAAI,IAAI,CAAC,IAAI,SAAS,IAAI,IAAI,EAAE,CAAC;QACzE,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC;QAC9B,OAAO,IAAI,CAAC,OAAO,CAAC;QACpB,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,sDAAsD,CAAC,CAAC;IACzE,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,aAAa;AAEb;;GAEG"}
@@ -1,16 +0,0 @@
1
- /**
2
- * Retrives app strings from its resources for the given language
3
- * or the default device language.
4
- * @this {AndroidUiautomator2Driver}
5
- * @param {import('./types').GetAppStringsOptions} [opts={}]
6
- * @returns {Promise<StringRecord>}
7
- */
8
- export async function mobileGetAppStrings(opts) {
9
- return await this.getStrings(opts?.language);
10
- }
11
-
12
- /**
13
- * @typedef {import('appium-adb').ADB} ADB
14
- * @typedef {import('@appium/types').StringRecord} StringRecord
15
- * @typedef {import('../driver').AndroidUiautomator2Driver} AndroidUiautomator2Driver
16
- */