appium-uiautomator2-driver 2.12.4 → 2.12.5
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 +7 -0
- package/build/index.js +1 -1
- package/build/lib/commands/actions.js +1 -1
- package/build/lib/commands/actions.js.map +1 -1
- package/build/lib/commands/alert.js +1 -1
- package/build/lib/commands/alert.js.map +1 -1
- package/build/lib/commands/battery.js +1 -1
- package/build/lib/commands/battery.js.map +1 -1
- package/build/lib/commands/element.js +1 -1
- package/build/lib/commands/element.js.map +1 -1
- package/build/lib/commands/find.js +1 -1
- package/build/lib/commands/find.js.map +1 -1
- package/build/lib/commands/general.js +1 -1
- package/build/lib/commands/general.js.map +1 -1
- package/build/lib/commands/gestures.js +1 -1
- package/build/lib/commands/gestures.js.map +1 -1
- package/build/lib/commands/index.js +1 -1
- package/build/lib/commands/index.js.map +1 -1
- package/build/lib/commands/screenshot.js +1 -1
- package/build/lib/commands/screenshot.js.map +1 -1
- package/build/lib/commands/touch.js +1 -1
- package/build/lib/commands/touch.js.map +1 -1
- package/build/lib/commands/viewport.js +1 -1
- package/build/lib/commands/viewport.js.map +1 -1
- package/build/lib/css-converter.js +1 -1
- package/build/lib/css-converter.js.map +1 -1
- package/build/lib/desired-caps.js +1 -1
- package/build/lib/desired-caps.js.map +1 -1
- package/build/lib/driver.js +1 -1
- package/build/lib/driver.js.map +1 -1
- package/build/lib/extensions.js +1 -1
- package/build/lib/extensions.js.map +1 -1
- package/build/lib/helpers.js +1 -1
- package/build/lib/helpers.js.map +1 -1
- package/build/lib/logger.js +1 -1
- package/build/lib/logger.js.map +1 -1
- package/build/lib/method-map.js +1 -1
- package/build/lib/method-map.js.map +1 -1
- package/build/lib/uiautomator2.js +1 -1
- package/build/lib/uiautomator2.js.map +1 -1
- package/npm-shrinkwrap.json +108 -101
- package/package.json +3 -2
- package/scripts/reset.js +30 -0
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"automated testing",
|
|
8
8
|
"android"
|
|
9
9
|
],
|
|
10
|
-
"version": "2.12.
|
|
10
|
+
"version": "2.12.5",
|
|
11
11
|
"author": "Appium Contributors",
|
|
12
12
|
"license": "Apache-2.0",
|
|
13
13
|
"repository": {
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
"lib",
|
|
53
53
|
"build/index.js",
|
|
54
54
|
"build/lib",
|
|
55
|
+
"scripts",
|
|
55
56
|
"CHANGELOG.md"
|
|
56
57
|
],
|
|
57
58
|
"dependencies": {
|
|
@@ -111,7 +112,7 @@
|
|
|
111
112
|
"fancy-log": "^2.0.0",
|
|
112
113
|
"lint-staged": "^13.0.3",
|
|
113
114
|
"mocha": "^10.0.0",
|
|
114
|
-
"pngjs": "^
|
|
115
|
+
"pngjs": "^7.0.0",
|
|
115
116
|
"pre-commit": "^1.2.2",
|
|
116
117
|
"rimraf": "^4.0.4",
|
|
117
118
|
"semantic-release": "^20.0.2",
|
package/scripts/reset.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const { ADB } = require('appium-adb');
|
|
2
|
+
const B = require('bluebird');
|
|
3
|
+
const log = require('fancy-log');
|
|
4
|
+
|
|
5
|
+
const SERVER_PKGS = [
|
|
6
|
+
'io.appium.uiautomator2.server',
|
|
7
|
+
'io.appium.uiautomator2.server.test',
|
|
8
|
+
'io.appium.settings',
|
|
9
|
+
];
|
|
10
|
+
|
|
11
|
+
async function runReset () {
|
|
12
|
+
const adb = await ADB.createADB();
|
|
13
|
+
const udids = (await adb.getConnectedDevices())
|
|
14
|
+
.filter(({state}) => state === 'device')
|
|
15
|
+
.map(({udid}) => udid);
|
|
16
|
+
if (0 === udids.length) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
log.info(`About to perform reset for the following device${udids.length === 1 ? '' : 's'}: ${udids}`);
|
|
21
|
+
const uninstallPromises = [];
|
|
22
|
+
for (const udid of udids) {
|
|
23
|
+
const deviceAdb = udids.length === 1 ? adb : await ADB.createADB();
|
|
24
|
+
deviceAdb.setDeviceId(udid);
|
|
25
|
+
uninstallPromises.push(...(SERVER_PKGS.map((pkgId) => deviceAdb.uninstallApk(pkgId))));
|
|
26
|
+
}
|
|
27
|
+
await B.all(uninstallPromises);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
(async () => await runReset())();
|