appium-uiautomator2-driver 5.0.7 → 6.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.
- package/CHANGELOG.md +16 -0
- package/README.md +3 -1
- package/build/lib/driver.d.ts.map +1 -1
- package/build/lib/driver.js +8 -10
- package/build/lib/driver.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/lib/driver.ts +7 -12
- package/npm-shrinkwrap.json +40 -18
- package/package.json +4 -4
package/lib/driver.ts
CHANGED
|
@@ -152,7 +152,7 @@ const DEVICE_PORT = 6790;
|
|
|
152
152
|
// We will forward one of the ports above on the system to this port on the
|
|
153
153
|
// device.
|
|
154
154
|
const MJPEG_SERVER_DEVICE_PORT = 7810;
|
|
155
|
-
|
|
155
|
+
const MIN_SUPPORTED_API_LEVEL = 26;
|
|
156
156
|
const LOCALHOST_IP4 = '127.0.0.1';
|
|
157
157
|
|
|
158
158
|
// NO_PROXY contains the paths that we never want to proxy to UiAutomator2 server.
|
|
@@ -370,12 +370,10 @@ class AndroidUiautomator2Driver
|
|
|
370
370
|
this.log.info(`We're going to run a Chrome-based session`);
|
|
371
371
|
const {pkg, activity: defaultActivity} = utils.getChromePkg(this.opts.browserName!);
|
|
372
372
|
let activity: string = defaultActivity;
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
}
|
|
377
|
-
this.log.warn(`Using the default ${pkg} activity ${activity}. Original error: ${e.message}`);
|
|
378
|
-
}
|
|
373
|
+
try {
|
|
374
|
+
activity = await this.adb.resolveLaunchableActivity(pkg);
|
|
375
|
+
} catch (e) {
|
|
376
|
+
this.log.warn(`Using the default ${pkg} activity ${activity}. Original error: ${e.message}`);
|
|
379
377
|
}
|
|
380
378
|
this.opts.appPackage = this.caps.appPackage = pkg;
|
|
381
379
|
this.opts.appActivity = this.caps.appActivity = activity;
|
|
@@ -523,11 +521,8 @@ class AndroidUiautomator2Driver
|
|
|
523
521
|
|
|
524
522
|
async performSessionPreExecSetup(): Promise<StringRecord|undefined> {
|
|
525
523
|
const apiLevel = await this.adb.getApiLevel();
|
|
526
|
-
if (apiLevel <
|
|
527
|
-
throw this.log.errorWithException(
|
|
528
|
-
'UIAutomator2 is only supported since Android 5.0 (Lollipop). ' +
|
|
529
|
-
'You could still use other supported backends in order to automate older Android versions.'
|
|
530
|
-
);
|
|
524
|
+
if (apiLevel < MIN_SUPPORTED_API_LEVEL) {
|
|
525
|
+
throw this.log.errorWithException('UIAutomator2 only supports Android 8.0 (Oreo) and above');
|
|
531
526
|
}
|
|
532
527
|
|
|
533
528
|
const preflightPromises: Promise<any>[] = [];
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "appium-uiautomator2-driver",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "appium-uiautomator2-driver",
|
|
9
|
-
"version": "
|
|
9
|
+
"version": "6.0.1",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"appium-adb": "^14.0.0",
|
|
13
|
-
"appium-android-driver": "^
|
|
14
|
-
"appium-uiautomator2-server": "^
|
|
13
|
+
"appium-android-driver": "^12.0.0",
|
|
14
|
+
"appium-uiautomator2-server": "^9.0.0",
|
|
15
15
|
"asyncbox": "^3.0.0",
|
|
16
16
|
"axios": "^1.12.2",
|
|
17
17
|
"bluebird": "^3.5.1",
|
|
18
18
|
"css-selector-parser": "^3.0.0",
|
|
19
|
-
"io.appium.settings": "^
|
|
19
|
+
"io.appium.settings": "^7.0.0",
|
|
20
20
|
"lodash": "^4.17.4",
|
|
21
21
|
"portscanner": "^2.2.0",
|
|
22
22
|
"source-map-support": "^0.x",
|
|
@@ -97,6 +97,17 @@
|
|
|
97
97
|
"spdy": "4.0.2"
|
|
98
98
|
}
|
|
99
99
|
},
|
|
100
|
+
"node_modules/@appium/base-driver/node_modules/axios": {
|
|
101
|
+
"version": "1.12.2",
|
|
102
|
+
"resolved": "https://registry.npmjs.org/axios/-/axios-1.12.2.tgz",
|
|
103
|
+
"integrity": "sha512-vMJzPewAlRyOgxV2dU0Cuz2O8zzzx9VYtbJOaBgXFeLc4IV/Eg50n4LowmehOOR61S8ZMpc2K5Sa7g6A4jfkUw==",
|
|
104
|
+
"license": "MIT",
|
|
105
|
+
"dependencies": {
|
|
106
|
+
"follow-redirects": "^1.15.6",
|
|
107
|
+
"form-data": "^4.0.4",
|
|
108
|
+
"proxy-from-env": "^1.1.0"
|
|
109
|
+
}
|
|
110
|
+
},
|
|
100
111
|
"node_modules/@appium/docutils": {
|
|
101
112
|
"version": "2.1.1",
|
|
102
113
|
"resolved": "https://registry.npmjs.org/@appium/docutils/-/docutils-2.1.1.tgz",
|
|
@@ -222,6 +233,17 @@
|
|
|
222
233
|
"sharp": "0.34.4"
|
|
223
234
|
}
|
|
224
235
|
},
|
|
236
|
+
"node_modules/@appium/support/node_modules/axios": {
|
|
237
|
+
"version": "1.12.2",
|
|
238
|
+
"resolved": "https://registry.npmjs.org/axios/-/axios-1.12.2.tgz",
|
|
239
|
+
"integrity": "sha512-vMJzPewAlRyOgxV2dU0Cuz2O8zzzx9VYtbJOaBgXFeLc4IV/Eg50n4LowmehOOR61S8ZMpc2K5Sa7g6A4jfkUw==",
|
|
240
|
+
"license": "MIT",
|
|
241
|
+
"dependencies": {
|
|
242
|
+
"follow-redirects": "^1.15.6",
|
|
243
|
+
"form-data": "^4.0.4",
|
|
244
|
+
"proxy-from-env": "^1.1.0"
|
|
245
|
+
}
|
|
246
|
+
},
|
|
225
247
|
"node_modules/@appium/support/node_modules/teen_process": {
|
|
226
248
|
"version": "3.0.1",
|
|
227
249
|
"resolved": "https://registry.npmjs.org/teen_process/-/teen_process-3.0.1.tgz",
|
|
@@ -482,9 +504,9 @@
|
|
|
482
504
|
}
|
|
483
505
|
},
|
|
484
506
|
"node_modules/appium-android-driver": {
|
|
485
|
-
"version": "
|
|
486
|
-
"resolved": "https://registry.npmjs.org/appium-android-driver/-/appium-android-driver-
|
|
487
|
-
"integrity": "sha512-
|
|
507
|
+
"version": "12.0.1",
|
|
508
|
+
"resolved": "https://registry.npmjs.org/appium-android-driver/-/appium-android-driver-12.0.1.tgz",
|
|
509
|
+
"integrity": "sha512-pV4+TO07rRLI0JiHeXGBkAJSvoUrI+0JgeiiDU6lvQl/kmm8Phx5TSAP5iKHvnQllJeHUd5E8FTp5Miu4tbgKA==",
|
|
488
510
|
"license": "Apache-2.0",
|
|
489
511
|
"dependencies": {
|
|
490
512
|
"@appium/support": "^7.0.0-rc.1",
|
|
@@ -494,7 +516,7 @@
|
|
|
494
516
|
"asyncbox": "^3.0.0",
|
|
495
517
|
"axios": "^1.x",
|
|
496
518
|
"bluebird": "^3.4.7",
|
|
497
|
-
"io.appium.settings": "^
|
|
519
|
+
"io.appium.settings": "^7.0.0",
|
|
498
520
|
"lodash": "^4.17.4",
|
|
499
521
|
"lru-cache": "^11.1.0",
|
|
500
522
|
"moment": "^2.24.0",
|
|
@@ -539,9 +561,9 @@
|
|
|
539
561
|
}
|
|
540
562
|
},
|
|
541
563
|
"node_modules/appium-uiautomator2-server": {
|
|
542
|
-
"version": "
|
|
543
|
-
"resolved": "https://registry.npmjs.org/appium-uiautomator2-server/-/appium-uiautomator2-server-
|
|
544
|
-
"integrity": "sha512-
|
|
564
|
+
"version": "9.1.0",
|
|
565
|
+
"resolved": "https://registry.npmjs.org/appium-uiautomator2-server/-/appium-uiautomator2-server-9.1.0.tgz",
|
|
566
|
+
"integrity": "sha512-UFC799mldK5tkNlbbHX0I8bkgcR5wkcmADyODDDY7ILdhIAcuwU8uSt0AVjtXQLW1kzKGI697YG58UzrNIaY3Q==",
|
|
545
567
|
"license": "Apache-2.0",
|
|
546
568
|
"engines": {
|
|
547
569
|
"node": "^20.19.0 || ^22.12.0 || >=24.0.0",
|
|
@@ -705,9 +727,9 @@
|
|
|
705
727
|
"license": "MIT"
|
|
706
728
|
},
|
|
707
729
|
"node_modules/axios": {
|
|
708
|
-
"version": "1.
|
|
709
|
-
"resolved": "https://registry.npmjs.org/axios/-/axios-1.
|
|
710
|
-
"integrity": "sha512-
|
|
730
|
+
"version": "1.13.0",
|
|
731
|
+
"resolved": "https://registry.npmjs.org/axios/-/axios-1.13.0.tgz",
|
|
732
|
+
"integrity": "sha512-zt40Pz4zcRXra9CVV31KeyofwiNvAbJ5B6YPz9pMJ+yOSLikvPT4Yi5LjfgjRa9CawVYBaD1JQzIVcIvBejKeA==",
|
|
711
733
|
"license": "MIT",
|
|
712
734
|
"dependencies": {
|
|
713
735
|
"follow-redirects": "^1.15.6",
|
|
@@ -1960,9 +1982,9 @@
|
|
|
1960
1982
|
}
|
|
1961
1983
|
},
|
|
1962
1984
|
"node_modules/io.appium.settings": {
|
|
1963
|
-
"version": "
|
|
1964
|
-
"resolved": "https://registry.npmjs.org/io.appium.settings/-/io.appium.settings-
|
|
1965
|
-
"integrity": "sha512-
|
|
1985
|
+
"version": "7.0.0",
|
|
1986
|
+
"resolved": "https://registry.npmjs.org/io.appium.settings/-/io.appium.settings-7.0.0.tgz",
|
|
1987
|
+
"integrity": "sha512-jf0HHzpReahpYElfngeEfkaiIqmUbUVFC7+xDF1onAOKiL4QBuwwaU+y/iQGY2/ECsYQKYgafK3Gri5MpFT4Yw==",
|
|
1966
1988
|
"license": "Apache-2.0",
|
|
1967
1989
|
"dependencies": {
|
|
1968
1990
|
"@appium/logger": "^2.0.0-rc.1",
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"automated testing",
|
|
8
8
|
"android"
|
|
9
9
|
],
|
|
10
|
-
"version": "
|
|
10
|
+
"version": "6.0.1",
|
|
11
11
|
"bugs": {
|
|
12
12
|
"url": "https://github.com/appium/appium-uiautomator2-driver/issues"
|
|
13
13
|
},
|
|
@@ -57,13 +57,13 @@
|
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"appium-adb": "^14.0.0",
|
|
60
|
-
"appium-android-driver": "^
|
|
61
|
-
"appium-uiautomator2-server": "^
|
|
60
|
+
"appium-android-driver": "^12.0.0",
|
|
61
|
+
"appium-uiautomator2-server": "^9.0.0",
|
|
62
62
|
"asyncbox": "^3.0.0",
|
|
63
63
|
"axios": "^1.12.2",
|
|
64
64
|
"bluebird": "^3.5.1",
|
|
65
65
|
"css-selector-parser": "^3.0.0",
|
|
66
|
-
"io.appium.settings": "^
|
|
66
|
+
"io.appium.settings": "^7.0.0",
|
|
67
67
|
"lodash": "^4.17.4",
|
|
68
68
|
"portscanner": "^2.2.0",
|
|
69
69
|
"source-map-support": "^0.x",
|