appium-uiautomator2-driver 2.42.1 → 2.43.0

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 (114) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/build/lib/commands/actions.d.ts +22 -1
  3. package/build/lib/commands/actions.d.ts.map +1 -1
  4. package/build/lib/commands/actions.js +30 -62
  5. package/build/lib/commands/actions.js.map +1 -1
  6. package/build/lib/commands/alert.d.ts +28 -1
  7. package/build/lib/commands/alert.d.ts.map +1 -1
  8. package/build/lib/commands/alert.js +42 -23
  9. package/build/lib/commands/alert.js.map +1 -1
  10. package/build/lib/commands/app-management.d.ts +19 -0
  11. package/build/lib/commands/app-management.d.ts.map +1 -0
  12. package/build/lib/commands/app-management.js +45 -0
  13. package/build/lib/commands/app-management.js.map +1 -0
  14. package/build/lib/commands/app-strings.d.ts +9 -0
  15. package/build/lib/commands/app-strings.d.ts.map +1 -1
  16. package/build/lib/commands/app-strings.js +11 -79
  17. package/build/lib/commands/app-strings.js.map +1 -1
  18. package/build/lib/commands/battery.d.ts +7 -0
  19. package/build/lib/commands/battery.d.ts.map +1 -1
  20. package/build/lib/commands/battery.js +14 -20
  21. package/build/lib/commands/battery.js.map +1 -1
  22. package/build/lib/commands/element.d.ts +100 -1
  23. package/build/lib/commands/element.d.ts.map +1 -1
  24. package/build/lib/commands/element.js +175 -125
  25. package/build/lib/commands/element.js.map +1 -1
  26. package/build/lib/commands/execute.d.ts +25 -0
  27. package/build/lib/commands/execute.d.ts.map +1 -0
  28. package/build/lib/commands/execute.js +109 -0
  29. package/build/lib/commands/execute.js.map +1 -0
  30. package/build/lib/commands/find.d.ts +10 -0
  31. package/build/lib/commands/find.d.ts.map +1 -1
  32. package/build/lib/commands/find.js +25 -27
  33. package/build/lib/commands/find.js.map +1 -1
  34. package/build/lib/commands/gestures.d.ts +103 -1
  35. package/build/lib/commands/gestures.d.ts.map +1 -1
  36. package/build/lib/commands/gestures.js +202 -173
  37. package/build/lib/commands/gestures.js.map +1 -1
  38. package/build/lib/commands/keyboard.d.ts +47 -0
  39. package/build/lib/commands/keyboard.d.ts.map +1 -0
  40. package/build/lib/commands/keyboard.js +92 -0
  41. package/build/lib/commands/keyboard.js.map +1 -0
  42. package/build/lib/commands/misc.d.ts +48 -0
  43. package/build/lib/commands/misc.d.ts.map +1 -0
  44. package/build/lib/commands/misc.js +75 -0
  45. package/build/lib/commands/misc.js.map +1 -0
  46. package/build/lib/commands/navigation.d.ts +20 -0
  47. package/build/lib/commands/navigation.d.ts.map +1 -0
  48. package/build/lib/commands/navigation.js +35 -0
  49. package/build/lib/commands/navigation.js.map +1 -0
  50. package/build/lib/commands/screenshot.d.ts +24 -1
  51. package/build/lib/commands/screenshot.d.ts.map +1 -1
  52. package/build/lib/commands/screenshot.js +87 -64
  53. package/build/lib/commands/screenshot.js.map +1 -1
  54. package/build/lib/commands/touch.d.ts +81 -0
  55. package/build/lib/commands/touch.d.ts.map +1 -1
  56. package/build/lib/commands/touch.js +158 -41
  57. package/build/lib/commands/touch.js.map +1 -1
  58. package/build/lib/commands/viewport.d.ts +37 -1
  59. package/build/lib/commands/viewport.d.ts.map +1 -1
  60. package/build/lib/commands/viewport.js +80 -36
  61. package/build/lib/commands/viewport.js.map +1 -1
  62. package/build/lib/driver.d.ts +94 -24
  63. package/build/lib/driver.d.ts.map +1 -1
  64. package/build/lib/driver.js +114 -28
  65. package/build/lib/driver.js.map +1 -1
  66. package/build/lib/helpers.d.ts +12 -6
  67. package/build/lib/helpers.d.ts.map +1 -1
  68. package/build/lib/helpers.js +18 -18
  69. package/build/lib/helpers.js.map +1 -1
  70. package/build/lib/method-map.d.ts +0 -23
  71. package/build/lib/method-map.d.ts.map +1 -1
  72. package/build/lib/uiautomator2.js +3 -3
  73. package/build/lib/uiautomator2.js.map +1 -1
  74. package/build/tsconfig.tsbuildinfo +1 -1
  75. package/lib/commands/actions.js +37 -114
  76. package/lib/commands/alert.js +51 -37
  77. package/lib/commands/app-management.js +42 -0
  78. package/lib/commands/app-strings.js +9 -89
  79. package/lib/commands/battery.js +16 -26
  80. package/lib/commands/element.js +235 -214
  81. package/lib/commands/execute.js +120 -0
  82. package/lib/commands/find.js +31 -37
  83. package/lib/commands/gestures.js +252 -234
  84. package/lib/commands/keyboard.js +103 -0
  85. package/lib/commands/misc.js +106 -0
  86. package/lib/commands/navigation.js +31 -0
  87. package/lib/commands/screenshot.js +96 -77
  88. package/lib/commands/touch.js +190 -48
  89. package/lib/commands/viewport.js +100 -50
  90. package/lib/driver.ts +225 -36
  91. package/lib/helpers.js +15 -22
  92. package/lib/uiautomator2.js +3 -3
  93. package/npm-shrinkwrap.json +96 -40
  94. package/package.json +3 -3
  95. package/build/lib/commands/general.d.ts +0 -4
  96. package/build/lib/commands/general.d.ts.map +0 -1
  97. package/build/lib/commands/general.js +0 -214
  98. package/build/lib/commands/general.js.map +0 -1
  99. package/build/lib/commands/index.d.ts +0 -2
  100. package/build/lib/commands/index.d.ts.map +0 -1
  101. package/build/lib/commands/index.js +0 -14
  102. package/build/lib/commands/index.js.map +0 -1
  103. package/build/lib/commands/mixins.d.ts +0 -87
  104. package/build/lib/commands/mixins.d.ts.map +0 -1
  105. package/build/lib/commands/mixins.js +0 -26
  106. package/build/lib/commands/mixins.js.map +0 -1
  107. package/build/lib/utils.d.ts +0 -10
  108. package/build/lib/utils.d.ts.map +0 -1
  109. package/build/lib/utils.js +0 -26
  110. package/build/lib/utils.js.map +0 -1
  111. package/lib/commands/general.js +0 -289
  112. package/lib/commands/index.js +0 -11
  113. package/lib/commands/mixins.ts +0 -169
  114. package/lib/utils.js +0 -19
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "appium-uiautomator2-driver",
3
- "version": "2.42.1",
3
+ "version": "2.43.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "appium-uiautomator2-driver",
9
- "version": "2.42.1",
9
+ "version": "2.43.0",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
12
  "appium-adb": "^12.0.0",
13
- "appium-android-driver": "^7.8.1",
13
+ "appium-android-driver": "^8.1.5",
14
14
  "appium-chromedriver": "^5.6.28",
15
15
  "appium-uiautomator2-server": "^6.0.3",
16
16
  "asyncbox": "^3.0.0",
@@ -69,7 +69,7 @@
69
69
  "mocha": "^10.0.0",
70
70
  "prettier": "^3.0.3",
71
71
  "rimraf": "^5.0.0",
72
- "semantic-release": "^22.0.5",
72
+ "semantic-release": "^23.0.0",
73
73
  "sharp": "^0.x",
74
74
  "sinon": "^17.0.0",
75
75
  "sinon-chai": "^3.7.0",
@@ -137,6 +137,17 @@
137
137
  "proxy-from-env": "^1.1.0"
138
138
  }
139
139
  },
140
+ "node_modules/@appium/base-driver/node_modules/type-fest": {
141
+ "version": "4.9.0",
142
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.9.0.tgz",
143
+ "integrity": "sha512-KS/6lh/ynPGiHD/LnAobrEFq3Ad4pBzOlJ1wAnJx9N4EYoqFhMfLIBjUT2UEx4wg5ZE+cC1ob6DCSpppVo+rtg==",
144
+ "engines": {
145
+ "node": ">=16"
146
+ },
147
+ "funding": {
148
+ "url": "https://github.com/sponsors/sindresorhus"
149
+ }
150
+ },
140
151
  "node_modules/@appium/base-plugin": {
141
152
  "version": "2.2.26",
142
153
  "resolved": "https://registry.npmjs.org/@appium/base-plugin/-/base-plugin-2.2.26.tgz",
@@ -186,6 +197,17 @@
186
197
  "npm": ">=8"
187
198
  }
188
199
  },
200
+ "node_modules/@appium/docutils/node_modules/type-fest": {
201
+ "version": "4.9.0",
202
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.9.0.tgz",
203
+ "integrity": "sha512-KS/6lh/ynPGiHD/LnAobrEFq3Ad4pBzOlJ1wAnJx9N4EYoqFhMfLIBjUT2UEx4wg5ZE+cC1ob6DCSpppVo+rtg==",
204
+ "engines": {
205
+ "node": ">=16"
206
+ },
207
+ "funding": {
208
+ "url": "https://github.com/sponsors/sindresorhus"
209
+ }
210
+ },
189
211
  "node_modules/@appium/schema": {
190
212
  "version": "0.5.0",
191
213
  "resolved": "https://registry.npmjs.org/@appium/schema/-/schema-0.5.0.tgz",
@@ -409,6 +431,17 @@
409
431
  "@img/sharp-win32-x64": "0.33.1"
410
432
  }
411
433
  },
434
+ "node_modules/@appium/support/node_modules/type-fest": {
435
+ "version": "4.9.0",
436
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.9.0.tgz",
437
+ "integrity": "sha512-KS/6lh/ynPGiHD/LnAobrEFq3Ad4pBzOlJ1wAnJx9N4EYoqFhMfLIBjUT2UEx4wg5ZE+cC1ob6DCSpppVo+rtg==",
438
+ "engines": {
439
+ "node": ">=16"
440
+ },
441
+ "funding": {
442
+ "url": "https://github.com/sponsors/sindresorhus"
443
+ }
444
+ },
412
445
  "node_modules/@appium/tsconfig": {
413
446
  "version": "0.3.2",
414
447
  "resolved": "https://registry.npmjs.org/@appium/tsconfig/-/tsconfig-0.3.2.tgz",
@@ -438,6 +471,17 @@
438
471
  "npm": ">=8"
439
472
  }
440
473
  },
474
+ "node_modules/@appium/types/node_modules/type-fest": {
475
+ "version": "4.9.0",
476
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.9.0.tgz",
477
+ "integrity": "sha512-KS/6lh/ynPGiHD/LnAobrEFq3Ad4pBzOlJ1wAnJx9N4EYoqFhMfLIBjUT2UEx4wg5ZE+cC1ob6DCSpppVo+rtg==",
478
+ "engines": {
479
+ "node": ">=16"
480
+ },
481
+ "funding": {
482
+ "url": "https://github.com/sponsors/sindresorhus"
483
+ }
484
+ },
441
485
  "node_modules/@babel/code-frame": {
442
486
  "version": "7.23.5",
443
487
  "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz",
@@ -920,9 +964,9 @@
920
964
  }
921
965
  },
922
966
  "node_modules/@types/node": {
923
- "version": "20.11.0",
924
- "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.0.tgz",
925
- "integrity": "sha512-o9bjXmDNcF7GbM4CNQpmi+TutCgap/K3w1JyKgxAjqx41zp9qlIAVFi0IhCNsJcXolEqLWhbFbEeL0PvYm4pcQ==",
967
+ "version": "20.11.6",
968
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.6.tgz",
969
+ "integrity": "sha512-+EOokTnksGVgip2PbYbr3xnR7kZigh4LbybAfBAw5BpnQ+FqBYUsvCEjYd70IXKlbohQ64mzEYmMtlWUY8q//Q==",
926
970
  "dependencies": {
927
971
  "undici-types": "~5.26.4"
928
972
  }
@@ -1165,9 +1209,9 @@
1165
1209
  }
1166
1210
  },
1167
1211
  "node_modules/appium-adb": {
1168
- "version": "12.0.0",
1169
- "resolved": "https://registry.npmjs.org/appium-adb/-/appium-adb-12.0.0.tgz",
1170
- "integrity": "sha512-JXKYOHaB5uXeq/n6q4SI61pm6+PJBv0q+Hy5rka0xfcWnfqZ+kp4LOGpMFEK1tlsSi03J1fwmKFUi/q0srysXQ==",
1212
+ "version": "12.0.2",
1213
+ "resolved": "https://registry.npmjs.org/appium-adb/-/appium-adb-12.0.2.tgz",
1214
+ "integrity": "sha512-Zl/iwOZkLMUT1zIL3Aw8Sgf4Jz7EdLBZ5lQtRTrMfDGXCYzxiNQrEQx888Z7Nr114xBtH57h+mP9CVld/xnmZQ==",
1171
1215
  "dependencies": {
1172
1216
  "@appium/support": "^4.0.0",
1173
1217
  "@devicefarmer/adbkit-apkreader": "^3.2.4",
@@ -1187,13 +1231,13 @@
1187
1231
  }
1188
1232
  },
1189
1233
  "node_modules/appium-android-driver": {
1190
- "version": "7.8.1",
1191
- "resolved": "https://registry.npmjs.org/appium-android-driver/-/appium-android-driver-7.8.1.tgz",
1192
- "integrity": "sha512-D8YSYRC1LcDZPSMj2meEBfeJTpS2bwAbrMbrpFhjTGYbmmMAbJgLzLpKu7kanhoQIhTtKaySQuEuebKPKQ201w==",
1234
+ "version": "8.1.5",
1235
+ "resolved": "https://registry.npmjs.org/appium-android-driver/-/appium-android-driver-8.1.5.tgz",
1236
+ "integrity": "sha512-oA49TJmWQriOH9aWBAAAy8J9UsyYmVkhFzBkKbMaIDU8A+ka9SfO3tWH6xe598tfI5rxUzhx35iP099IRulKRg==",
1193
1237
  "dependencies": {
1194
1238
  "@appium/support": "^4.2.0",
1195
1239
  "@colors/colors": "^1.6.0",
1196
- "appium-adb": "^12.0.0",
1240
+ "appium-adb": "^12.0.2",
1197
1241
  "appium-chromedriver": "^5.5.1",
1198
1242
  "asyncbox": "^3.0.0",
1199
1243
  "axios": "^1.x",
@@ -1219,9 +1263,9 @@
1219
1263
  }
1220
1264
  },
1221
1265
  "node_modules/appium-chromedriver": {
1222
- "version": "5.6.28",
1223
- "resolved": "https://registry.npmjs.org/appium-chromedriver/-/appium-chromedriver-5.6.28.tgz",
1224
- "integrity": "sha512-aFZ5R8aVL9iHAgg4oJ+01xeqnH+nYMM5tXlt3iwxtwwJ5NXyblkZNvejbmh1WdzJZUrd/T6klw1gUXFrolxLbA==",
1266
+ "version": "5.6.30",
1267
+ "resolved": "https://registry.npmjs.org/appium-chromedriver/-/appium-chromedriver-5.6.30.tgz",
1268
+ "integrity": "sha512-UX/Ma1TPJ9dxCVCHctnrmC8bjnKlYpfMgmIsd5KBfYn4wvALpGgfcL5dxSktey0qU87iFckK0vrcFRwZjQR4gQ==",
1225
1269
  "hasInstallScript": true,
1226
1270
  "dependencies": {
1227
1271
  "@appium/base-driver": "^9.1.0",
@@ -1245,9 +1289,9 @@
1245
1289
  }
1246
1290
  },
1247
1291
  "node_modules/appium-uiautomator2-server": {
1248
- "version": "6.0.3",
1249
- "resolved": "https://registry.npmjs.org/appium-uiautomator2-server/-/appium-uiautomator2-server-6.0.3.tgz",
1250
- "integrity": "sha512-BQNHvbqQmO2YGXi7+7S5p3GORljlo/JvOILQGWuKt7bbYmwSFyDk+/kMhJ99BWOSfByPCv1ksgjq1MeJ0Rabtg==",
1292
+ "version": "6.0.5",
1293
+ "resolved": "https://registry.npmjs.org/appium-uiautomator2-server/-/appium-uiautomator2-server-6.0.5.tgz",
1294
+ "integrity": "sha512-UBT2fA6r8KEm0lD9H7/EVnaG0CERS9OI77m19LrD7Kj1PSZgXEFnhdMWOP/5ToLGo/mtxIoHQ2dLsVLw3zYMEg==",
1251
1295
  "engines": {
1252
1296
  "node": ">=14",
1253
1297
  "npm": ">=8"
@@ -1263,6 +1307,17 @@
1263
1307
  "proxy-from-env": "^1.1.0"
1264
1308
  }
1265
1309
  },
1310
+ "node_modules/appium/node_modules/type-fest": {
1311
+ "version": "4.9.0",
1312
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.9.0.tgz",
1313
+ "integrity": "sha512-KS/6lh/ynPGiHD/LnAobrEFq3Ad4pBzOlJ1wAnJx9N4EYoqFhMfLIBjUT2UEx4wg5ZE+cC1ob6DCSpppVo+rtg==",
1314
+ "engines": {
1315
+ "node": ">=16"
1316
+ },
1317
+ "funding": {
1318
+ "url": "https://github.com/sponsors/sindresorhus"
1319
+ }
1320
+ },
1266
1321
  "node_modules/aproba": {
1267
1322
  "version": "2.0.0",
1268
1323
  "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz",
@@ -1382,9 +1437,9 @@
1382
1437
  "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
1383
1438
  },
1384
1439
  "node_modules/axios": {
1385
- "version": "1.6.5",
1386
- "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.5.tgz",
1387
- "integrity": "sha512-Ii012v05KEVuUoFWmMW/UQv9aRIc3ZwkWDcM+h5Il8izZCtRVpDUfwpoFf7eOtajT3QiGR4yDUx7lPqHJULgbg==",
1440
+ "version": "1.6.6",
1441
+ "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.6.tgz",
1442
+ "integrity": "sha512-XZLZDFfXKM9U/Y/B4nNynfCRUqNyVZ4sBC/n9GDRCkq9vd2mIvKjKKsbIh1WPmHmNbg6ND7cTBY3Y2+u1G3/2Q==",
1388
1443
  "dependencies": {
1389
1444
  "follow-redirects": "^1.15.4",
1390
1445
  "form-data": "^4.0.0",
@@ -2715,9 +2770,9 @@
2715
2770
  }
2716
2771
  },
2717
2772
  "node_modules/io.appium.settings": {
2718
- "version": "5.7.2",
2719
- "resolved": "https://registry.npmjs.org/io.appium.settings/-/io.appium.settings-5.7.2.tgz",
2720
- "integrity": "sha512-iK5e2t0+4S5jFUcbSp+gs+yFJGI8zLL7VQc1KOUo5S5XtebZ4NTsvIdL1QyDRdMgbGAPORnPbyQzbefFPX5/ug==",
2773
+ "version": "5.7.5",
2774
+ "resolved": "https://registry.npmjs.org/io.appium.settings/-/io.appium.settings-5.7.5.tgz",
2775
+ "integrity": "sha512-h6QyCJGERuvMqa+nPytqjJ024rShyX6lc4G4fG0jVrMYsQL64ymtMwVkKkRMED69meuDCuy/4H69qXuJCe5S0w==",
2721
2776
  "dependencies": {
2722
2777
  "asyncbox": "^3.0.0",
2723
2778
  "bluebird": "^3.5.1",
@@ -3958,14 +4013,15 @@
3958
4013
  "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw=="
3959
4014
  },
3960
4015
  "node_modules/set-function-length": {
3961
- "version": "1.1.1",
3962
- "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz",
3963
- "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==",
4016
+ "version": "1.2.0",
4017
+ "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.0.tgz",
4018
+ "integrity": "sha512-4DBHDoyHlM1IRPGYcoxexgh67y4ueR53FKV1yyxwFMY7aCqcN/38M1+SwZ/qJQ8iLv7+ck385ot4CcisOAPT9w==",
3964
4019
  "dependencies": {
3965
4020
  "define-data-property": "^1.1.1",
3966
- "get-intrinsic": "^1.2.1",
4021
+ "function-bind": "^1.1.2",
4022
+ "get-intrinsic": "^1.2.2",
3967
4023
  "gopd": "^1.0.1",
3968
- "has-property-descriptors": "^1.0.0"
4024
+ "has-property-descriptors": "^1.0.1"
3969
4025
  },
3970
4026
  "engines": {
3971
4027
  "node": ">= 0.4"
@@ -4061,9 +4117,9 @@
4061
4117
  }
4062
4118
  },
4063
4119
  "node_modules/spdx-exceptions": {
4064
- "version": "2.3.0",
4065
- "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz",
4066
- "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A=="
4120
+ "version": "2.4.0",
4121
+ "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.4.0.tgz",
4122
+ "integrity": "sha512-hcjppoJ68fhxA/cjbN4T8N6uCUejN8yFw69ttpqtBeCbF3u13n7mb31NB9jKwGTTWWnt9IbRA/mf1FprYS8wfw=="
4067
4123
  },
4068
4124
  "node_modules/spdx-expression-parse": {
4069
4125
  "version": "3.0.1",
@@ -4276,9 +4332,9 @@
4276
4332
  }
4277
4333
  },
4278
4334
  "node_modules/tar-stream": {
4279
- "version": "3.1.6",
4280
- "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.6.tgz",
4281
- "integrity": "sha512-B/UyjYwPpMBv+PaFSWAmtYjwdrlEaZQEhMIBFNC5oEG8lpiW8XjcSdmEaClj28ArfKScKHs2nshz3k2le6crsg==",
4335
+ "version": "3.1.7",
4336
+ "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.7.tgz",
4337
+ "integrity": "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==",
4282
4338
  "dependencies": {
4283
4339
  "b4a": "^1.6.4",
4284
4340
  "fast-fifo": "^1.2.0",
@@ -4340,9 +4396,9 @@
4340
4396
  "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q=="
4341
4397
  },
4342
4398
  "node_modules/type-fest": {
4343
- "version": "4.9.0",
4344
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.9.0.tgz",
4345
- "integrity": "sha512-KS/6lh/ynPGiHD/LnAobrEFq3Ad4pBzOlJ1wAnJx9N4EYoqFhMfLIBjUT2UEx4wg5ZE+cC1ob6DCSpppVo+rtg==",
4399
+ "version": "4.10.1",
4400
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.10.1.tgz",
4401
+ "integrity": "sha512-7ZnJYTp6uc04uYRISWtiX3DSKB/fxNQT0B5o1OUeCqiQiwF+JC9+rJiZIDrPrNCLLuTqyQmh4VdQqh/ZOkv9MQ==",
4346
4402
  "engines": {
4347
4403
  "node": ">=16"
4348
4404
  },
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "automated testing",
8
8
  "android"
9
9
  ],
10
- "version": "2.42.1",
10
+ "version": "2.43.0",
11
11
  "bugs": {
12
12
  "url": "https://github.com/appium/appium-uiautomator2-driver/issues"
13
13
  },
@@ -63,7 +63,7 @@
63
63
  },
64
64
  "dependencies": {
65
65
  "appium-adb": "^12.0.0",
66
- "appium-android-driver": "^7.8.1",
66
+ "appium-android-driver": "^8.1.5",
67
67
  "appium-chromedriver": "^5.6.28",
68
68
  "appium-uiautomator2-server": "^6.0.3",
69
69
  "asyncbox": "^3.0.0",
@@ -122,7 +122,7 @@
122
122
  "mocha": "^10.0.0",
123
123
  "prettier": "^3.0.3",
124
124
  "rimraf": "^5.0.0",
125
- "semantic-release": "^22.0.5",
125
+ "semantic-release": "^23.0.0",
126
126
  "sharp": "^0.x",
127
127
  "sinon": "^17.0.0",
128
128
  "sinon-chai": "^3.7.0",
@@ -1,4 +0,0 @@
1
- export type UiAutomator2Server = import('../uiautomator2').UiAutomator2Server;
2
- export type ADB = import('appium-adb').ADB;
3
- export type StringRecord<T = any> = import('@appium/types').StringRecord<T>;
4
- //# sourceMappingURL=general.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"general.d.ts","sourceRoot":"","sources":["../../../lib/commands/general.js"],"names":[],"mappings":"iCAyRa,OAAO,iBAAiB,EAAE,kBAAkB;kBAC5C,OAAO,YAAY,EAAE,GAAG;oCAKxB,OAAO,eAAe,EAAE,YAAY,CAAC,CAAC,CAAC"}
@@ -1,214 +0,0 @@
1
- "use strict";
2
- // @ts-check
3
- var __importDefault = (this && this.__importDefault) || function (mod) {
4
- return (mod && mod.__esModule) ? mod : { "default": mod };
5
- };
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- const lodash_1 = __importDefault(require("lodash"));
8
- const bluebird_1 = __importDefault(require("bluebird"));
9
- const driver_1 = require("appium/driver");
10
- const extensions_1 = require("../extensions");
11
- const mixins_1 = require("./mixins");
12
- const driver_2 = require("../driver");
13
- const MOBILE_SCRIPT_NAME_PREFIX = 'mobile:';
14
- /**
15
- * Massages the arguments going into an execute method.
16
- * @remarks A similar method is implemented in `appium-xcuitest-driver`, but it
17
- * appears the methods in here handle unwrapping of `Element` objects, so we do
18
- * not do that here.
19
- * @param {readonly any[] | readonly [StringRecord] | Readonly<StringRecord>} [args]
20
- * @internal
21
- * @returns {StringRecord<unknown>}
22
- */
23
- function preprocessExecuteMethodArgs(args) {
24
- if (lodash_1.default.isArray(args)) {
25
- args = lodash_1.default.first(args);
26
- }
27
- const executeMethodArgs = /** @type {StringRecord<unknown>} */ (args ?? {});
28
- /**
29
- * Renames the deprecated `element` key to `elementId`. Historically,
30
- * all of the pre-Execute-Method-Map execute methods accepted an `element` _or_ and `elementId` param.
31
- * This assigns the `element` value to `elementId` if `elementId` is not already present.
32
- */
33
- if (!('elementId' in executeMethodArgs) && 'element' in executeMethodArgs) {
34
- executeMethodArgs.elementId = executeMethodArgs.element;
35
- delete executeMethodArgs.element;
36
- }
37
- return executeMethodArgs;
38
- }
39
- /**
40
- * Type guard to check if a script is an execute method.
41
- * @param {any} script
42
- * @internal
43
- * @returns {string?}
44
- */
45
- function toExecuteMethodName(script) {
46
- return lodash_1.default.startsWith(script, MOBILE_SCRIPT_NAME_PREFIX)
47
- ? script.replace(new RegExp(`${MOBILE_SCRIPT_NAME_PREFIX}\\s*`), `${MOBILE_SCRIPT_NAME_PREFIX} `)
48
- : null;
49
- }
50
- /**
51
- * @type {import('./mixins').UIA2GeneralMixin}
52
- * @satisfies {import('@appium/types').ExternalDriver}
53
- */
54
- const GeneralMixin = {
55
- async getPageSource() {
56
- return String(await this.uiautomator2.jwproxy.command('/source', 'GET', {}));
57
- },
58
- async getClipboard() {
59
- return String((await this.adb.getApiLevel()) < 29
60
- ? await this.uiautomator2.jwproxy.command('/appium/device/get_clipboard', 'POST', {})
61
- : await this.settingsApp.getClipboard());
62
- },
63
- async doSendKeys(params) {
64
- await this.uiautomator2.jwproxy.command('/keys', 'POST', params);
65
- },
66
- async keyevent(keycode, metastate) {
67
- this.log.debug(`Ignoring metastate ${metastate}`);
68
- await this.adb.keyevent(keycode);
69
- },
70
- async back() {
71
- await this.adb.keyevent(4);
72
- },
73
- async getDisplayDensity() {
74
- return /** @type {number} */ (await this.uiautomator2.jwproxy.command('/appium/device/display_density', 'GET', {}));
75
- },
76
- async getWindowSize() {
77
- return /** @type {import('@appium/types').Size} */ (await this.uiautomator2.jwproxy.command('/window/current/size', 'GET', {}));
78
- },
79
- // For W3C
80
- async getWindowRect() {
81
- const { width, height } = await this.getWindowSize();
82
- return {
83
- width,
84
- height,
85
- x: 0,
86
- y: 0,
87
- };
88
- },
89
- /**
90
- * @override
91
- * @privateRemarks Because the "mobile" commands (execute methods) in this
92
- * driver universally accept an options object, this method will _not_ call
93
- * into `BaseDriver.executeMethod`.
94
- */
95
- async execute(script, args) {
96
- const mobileScriptName = toExecuteMethodName(script);
97
- const isWebContext = this.isWebContext();
98
- if (mobileScriptName && isWebContext || !isWebContext) {
99
- if (mobileScriptName) {
100
- const executeMethodArgs = preprocessExecuteMethodArgs(args);
101
- this.log.info(`Executing method '${mobileScriptName}'`);
102
- return await this.executeMobile(mobileScriptName, executeMethodArgs);
103
- }
104
- // Just pass the script name through and let it fail with a proper error message
105
- return await this.executeMobile(`${script}`, {});
106
- }
107
- const endpoint =
108
- /** @type {import('appium-chromedriver').Chromedriver} */ (this.chromedriver).jwproxy
109
- .downstreamProtocol === driver_1.PROTOCOLS.MJSONWP
110
- ? '/execute'
111
- : '/execute/sync';
112
- return await /** @type {import('appium-chromedriver').Chromedriver} */ (this.chromedriver).jwproxy.command(endpoint, 'POST', {
113
- script,
114
- args,
115
- });
116
- },
117
- /**
118
- * @param script Must be of the form `mobile: <something>`, which differs from its parent class implementation.
119
- * @override
120
- */
121
- async executeMobile(script, opts = {}) {
122
- if (!(script in driver_2.AndroidUiautomator2Driver.executeMethodMap)) {
123
- const commandNames = lodash_1.default.map(lodash_1.default.keys(driver_2.AndroidUiautomator2Driver.executeMethodMap), (value) => value.slice(8));
124
- throw new driver_1.errors.UnknownCommandError(`Unknown mobile command "${script}". ` +
125
- `Only ${commandNames.join(', ')} commands are supported.`);
126
- }
127
- const methodName = driver_2.AndroidUiautomator2Driver.executeMethodMap[
128
- /** @type {keyof import('../execute-method-map').Uiautomator2ExecuteMethodMap} */ (script)].command;
129
- return await /** @type {(opts?: any) => Promise<unknown>} */ (this[methodName])(opts);
130
- },
131
- async mobileViewportScreenshot() {
132
- return await this.getViewportScreenshot();
133
- },
134
- /**
135
- * Returns the viewport coordinates.
136
- * @returns The viewport coordinates.
137
- */
138
- async mobileViewPortRect() {
139
- return await this.getViewPortRect();
140
- },
141
- async setUrl(url) {
142
- await this.adb.startUri(url, /** @type {string} */ (this.opts.appPackage));
143
- },
144
- /**
145
- * Start URL that take users directly to specific content in the app
146
- */
147
- async mobileDeepLink(opts) {
148
- const { url, package: pkg, waitForLaunch } = opts;
149
- return await this.adb.startUri(url, pkg, { waitForLaunch });
150
- },
151
- async openNotifications() {
152
- await this.uiautomator2.jwproxy.command('/appium/device/open_notifications', 'POST', {});
153
- },
154
- // Stop proxying to any Chromedriver and redirect to uiautomator2
155
- suspendChromedriverProxy() {
156
- this.chromedriver = undefined;
157
- this.proxyReqRes = this.uiautomator2.proxyReqRes.bind(this.uiautomator2);
158
- this.proxyCommand = /** @type {typeof this.proxyCommand} */ (this.uiautomator2.proxyCommand.bind(this.uiautomator2));
159
- this.jwpProxyActive = true;
160
- },
161
- /**
162
- * The list of available info entries can be found at
163
- * https://github.com/appium/appium-uiautomator2-server/blob/master/app/src/main/java/io/appium/uiautomator2/handler/GetDeviceInfo.java
164
- */
165
- async mobileGetDeviceInfo() {
166
- return /** @type {StringRecord} */ (await this.uiautomator2.jwproxy.command('/appium/device/info', 'GET'));
167
- },
168
- /**
169
- * Types the given Unicode string.
170
- * It is expected that the focus is already put
171
- * to the destination input field before this method is called.
172
- *
173
- * @returns `true` if the input text has been successfully sent to adb
174
- * @throws {Error} if `text` property has not been provided
175
- */
176
- async mobileType(opts) {
177
- const { text } = opts;
178
- if (lodash_1.default.isUndefined(text)) {
179
- this.log.errorAndThrow(`The 'text' argument is mandatory`);
180
- throw new Error(); // unreachable
181
- }
182
- return await this.settingsApp.typeUnicode(String(text));
183
- },
184
- /**
185
- * Install multiple APKs with `install-multiple` option.
186
- *
187
- * @throws {Error} if an error occured while installing the given APKs.
188
- */
189
- async mobileInstallMultipleApks(opts) {
190
- if (!lodash_1.default.isArray(opts.apks) || lodash_1.default.isEmpty(opts.apks)) {
191
- throw new driver_1.errors.InvalidArgumentError('No apks are given to install');
192
- }
193
- const apks = await bluebird_1.default.all(opts.apks.map((app) => this.helpers.configureApp(app, [extensions_1.APK_EXTENSION])));
194
- await this.adb.installMultipleApks(apks, opts.options);
195
- },
196
- /**
197
- * Puts the app to background and waits the given number of seconds Then restores the app
198
- * if necessary. The call is blocking.
199
- */
200
- async mobileBackgroundApp(opts = {}) {
201
- const { seconds = -1 } = opts;
202
- await this.background(seconds);
203
- },
204
- };
205
- (0, mixins_1.mixin)(GeneralMixin);
206
- /**
207
- * @typedef {import('../uiautomator2').UiAutomator2Server} UiAutomator2Server
208
- * @typedef {import('appium-adb').ADB} ADB
209
- */
210
- /**
211
- * @template [T=any]
212
- * @typedef {import('@appium/types').StringRecord<T>} StringRecord
213
- */
214
- //# sourceMappingURL=general.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"general.js","sourceRoot":"","sources":["../../../lib/commands/general.js"],"names":[],"mappings":";AAAA,YAAY;;;;;AAEZ,oDAAuB;AACvB,wDAAyB;AACzB,0CAAgD;AAChD,8CAA4C;AAC5C,qCAA+B;AAC/B,sCAAoD;AAEpD,MAAM,yBAAyB,GAAG,SAAS,CAAC;AAE5C;;;;;;;;GAQG;AACH,SAAS,2BAA2B,CAAC,IAAI;IACvC,IAAI,gBAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QACnB,IAAI,GAAG,gBAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;KACtB;IACD,MAAM,iBAAiB,GAAG,oCAAoC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;IAC5E;;;;OAIG;IACH,IAAI,CAAC,CAAC,WAAW,IAAI,iBAAiB,CAAC,IAAI,SAAS,IAAI,iBAAiB,EAAE;QACzE,iBAAiB,CAAC,SAAS,GAAG,iBAAiB,CAAC,OAAO,CAAC;QACxD,OAAO,iBAAiB,CAAC,OAAO,CAAC;KAClC;IAED,OAAO,iBAAiB,CAAC;AAC3B,CAAC;AAED;;;;;GAKG;AACH,SAAS,mBAAmB,CAAC,MAAM;IACjC,OAAO,gBAAC,CAAC,UAAU,CAAC,MAAM,EAA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AAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;IAC1D,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,yBAAyB,CAAC,IAAI;QAClC,IAAI,CAAC,gBAAC,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,gBAAC,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;YACjD,MAAM,IAAI,eAAM,CAAC,oBAAoB,CAAC,8BAA8B,CAAC,CAAC;SACvE;QACD,MAAM,IAAI,GAAG,MAAM,kBAAC,CAAC,GAAG,CACtB,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,0BAAa,CAAC,CAAC,CAAC,CACxE,CAAC;QACF,MAAM,IAAI,CAAC,GAAG,CAAC,mBAAmB,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IACzD,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,mBAAmB,CAAC,IAAI,GAAG,EAAE;QACjC,MAAM,EAAC,OAAO,GAAG,CAAC,CAAC,EAAC,GAAG,IAAI,CAAC;QAC5B,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IACjC,CAAC;CACF,CAAC;AAEF,IAAA,cAAK,EAAC,YAAY,CAAC,CAAC;AAEpB;;;GAGG;AAEH;;;GAGG"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/commands/index.js"],"names":[],"mappings":""}
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- require("./alert");
4
- require("./find");
5
- require("./general");
6
- require("./touch");
7
- require("./element");
8
- require("./actions");
9
- require("./viewport");
10
- require("./screenshot");
11
- require("./battery");
12
- require("./gestures");
13
- require("./app-strings");
14
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/commands/index.js"],"names":[],"mappings":";;AAAA,mBAAiB;AACjB,kBAAgB;AAChB,qBAAmB;AACnB,mBAAiB;AACjB,qBAAmB;AACnB,qBAAmB;AACnB,sBAAoB;AACpB,wBAAsB;AACtB,qBAAmB;AACnB,sBAAoB;AACpB,yBAAuB"}
@@ -1,87 +0,0 @@
1
- /**
2
- * @module
3
- * @privateRemarks These mixins are kind of a mishmash of stuff from `appium-android-driver`,
4
- * @privateRemarks unique things, and stuff from `ExternalDriver`. Ideally, we should be pulling the method
5
- * @privateRemarks definitions right out of `ExternalDriver` whenever possible. Also note that the mixins
6
- * @privateRemarks contain _more stuff than just commands or execute methods_.
7
- */
8
- import type { Element, ExternalDriver, StringRecord } from '@appium/types';
9
- import type { ActionsMixin, AlertMixin, ElementMixin, ExecuteMixin, FindMixin, GeneralMixin, NetworkMixin, TouchMixin } from 'appium-android-driver';
10
- import type { EmptyObject } from 'type-fest';
11
- import { AndroidUiautomator2Driver } from '../driver';
12
- import type * as types from './types';
13
- type UIA2Mixin<T = EmptyObject> = ThisType<import('../driver').AndroidUiautomator2Driver> & T;
14
- export type UIA2ActionsMixin = UIA2Mixin<Pick<ActionsMixin, 'pressKeyCode' | 'longPressKeyCode' | 'doSwipe' | 'doDrag' | 'getOrientation' | 'setOrientation'>> & {
15
- mobilePressKey(opts: types.PressKeyOptions): Promise<void>;
16
- mobileScheduleAction(opts?: StringRecord): Promise<unknown>;
17
- mobileGetActionHistory(opts?: types.ActionArgs): Promise<types.ActionResult>;
18
- mobileUnscheduleAction(opts?: types.ActionArgs): Promise<unknown>;
19
- };
20
- export type UIA2AlertMixin = UIA2Mixin<Pick<AlertMixin, 'getAlertText' | 'postAcceptAlert' | 'postDismissAlert'>> & {
21
- mobileAcceptAlert(opts?: types.AcceptAlertOptions): Promise<void>;
22
- mobileDismissAlert(opts?: types.DismissAlertOptions): Promise<void>;
23
- };
24
- export type UIA2AppStringsMixin = UIA2Mixin<Pick<GeneralMixin, 'getStrings'>> & {
25
- mobileGetAppStrings(opts?: types.GetAppStringsOptions): Promise<StringRecord>;
26
- };
27
- export type UIA2BatteryMixin = UIA2Mixin & {
28
- mobileGetBatteryInfo(): Promise<types.BatteryInfo>;
29
- };
30
- export type UIA2ElementMixin = UIA2Mixin<Pick<ElementMixin, 'getAttribute' | 'elementDisplayed' | 'elementEnabled' | 'elementSelected' | 'getName' | 'getLocation' | 'getSize' | 'touchLongClick' | 'touchDown' | 'touchUp' | 'touchMove' | 'doSetElementValue' | 'setValueImmediate' | 'getText' | 'click' | 'tap' | 'clear' | 'getElementRect'>> & {
31
- active(): Promise<Element>;
32
- mobileReplaceElementValue(opts: types.ReplaceValueOptions): Promise<void>;
33
- getElementScreenshot(elementId: string): Promise<string>;
34
- };
35
- export type UIA2FindMixin = UIA2Mixin<Pick<FindMixin, 'doFindElementOrEls'>>;
36
- export type UIA2GeneralMixin = UIA2Mixin<Pick<GeneralMixin & NetworkMixin & ActionsMixin & ExecuteMixin, 'getPageSource' | 'doSendKeys' | 'back' | 'getDisplayDensity' | 'getWindowSize' | 'getWindowRect' | 'setUrl' | 'keyevent' | 'execute' | 'executeMobile'>> & {
37
- getClipboard(): Promise<string>;
38
- mobileViewportScreenshot(): Promise<string>;
39
- mobileViewPortRect(): Promise<types.RelativeRect>;
40
- mobileDeepLink(opts: types.DeepLinkOpts): Promise<void>;
41
- openNotifications(): Promise<void>;
42
- suspendChromedriverProxy(): void;
43
- mobileGetDeviceInfo(): Promise<StringRecord>;
44
- mobileType(opts: types.TypingOptions): Promise<boolean>;
45
- mobileInstallMultipleApks(opts: types.InstallMultipleApksOptions): Promise<void>;
46
- mobileBackgroundApp(opts?: types.BackgroundAppOptions): Promise<void>;
47
- };
48
- export type UIA2ViewportMixin = UIA2Mixin & {
49
- getStatusBarHeight(): Promise<number>;
50
- getDevicePixelRatio(): Promise<string>;
51
- getViewportScreenshot(): Promise<string>;
52
- getViewPortRect(): Promise<types.RelativeRect>;
53
- };
54
- export type UIA2GesturesMixin = UIA2Mixin & {
55
- mobileClickGesture(opts?: types.ClickOptions): Promise<void>;
56
- mobileDoubleClickGesture(opts?: types.ClickOptions): Promise<void>;
57
- mobileDragGesture(opts: types.DragOptions): Promise<void>;
58
- mobileFlingGesture(opts: types.FlingOptions): Promise<boolean>;
59
- mobilePinchCloseGesture(opts: types.PinchOptions): Promise<void>;
60
- mobilePinchOpenGesture(opts: types.PinchOptions): Promise<void>;
61
- mobileSwipeGesture(opts: types.SwipeOptions): Promise<void>;
62
- mobileScrollGesture(opts: types.ScrollGestureOptions): Promise<boolean>;
63
- mobileScrollBackTo(opts: types.ScrollElementToElementOpts): Promise<void>;
64
- mobileScroll(opts: types.ScrollOptions): Promise<void>;
65
- mobileLongClickGesture(opts: types.LongClickOptions): Promise<void>;
66
- };
67
- export type UIA2ScreenshotMixin = UIA2Mixin<Pick<ActionsMixin, 'getScreenshot'>> & {
68
- mobileScreenshots(opts: types.ScreenshotsOpts): Promise<StringRecord<types.Screenshot>>;
69
- };
70
- export type UIA2TouchMixin = UIA2Mixin<Required<Pick<ExternalDriver & TouchMixin, 'performActions' | 'releaseActions' | 'doPerformMultiAction'>>>;
71
- declare module '../driver' {
72
- interface AndroidUiautomator2Driver extends UIA2ActionsMixin, UIA2AlertMixin, UIA2AppStringsMixin, UIA2BatteryMixin, UIA2ElementMixin, UIA2FindMixin, UIA2GeneralMixin, UIA2GesturesMixin, UIA2ScreenshotMixin, UIA2TouchMixin, UIA2ViewportMixin {
73
- }
74
- }
75
- /**
76
- * This function assigns a mixin `T` to the `AndroidUiautomator2Driver` class' prototype.
77
- *
78
- * While each mixin has its own interface which is (in isolation) unrelated to
79
- * `AndroidUiautomator2Driver`, the constraint on this generic type `T` is that it must be a
80
- * partial of `AndroidUiautomator2Driver`'s interface. This enforces that it does not
81
- * conflict with the existing interface of `AndroidUiautomator2Driver`. In that way, you
82
- * can think of it as a type guard.
83
- * @param mixin Mixin implementation
84
- */
85
- export declare function mixin<T extends Partial<AndroidUiautomator2Driver>>(mixin: T): void;
86
- export {};
87
- //# sourceMappingURL=mixins.d.ts.map