appium-uiautomator2-driver 2.2.0 → 2.4.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.
- package/README.md +52 -4
- package/build/index.js +10 -40
- package/build/lib/commands/element.js +5 -5
- package/build/lib/commands/general.js +9 -6
- package/build/lib/commands/gestures.js +5 -5
- package/build/lib/commands/viewport.js +2 -2
- package/build/lib/css-converter.js +4 -4
- package/build/lib/driver.js +23 -10
- package/build/lib/helpers.js +2 -2
- package/build/lib/logger.js +2 -2
- package/build/lib/uiautomator2.js +5 -5
- package/index.js +2 -25
- package/lib/commands/element.js +2 -2
- package/lib/commands/general.js +6 -2
- package/lib/commands/gestures.js +2 -2
- package/lib/commands/viewport.js +1 -1
- package/lib/css-converter.js +1 -1
- package/lib/driver.js +20 -6
- package/lib/helpers.js +1 -1
- package/lib/logger.js +1 -1
- package/lib/uiautomator2.js +2 -2
- package/npm-shrinkwrap.json +3719 -2477
- package/package.json +9 -8
- package/build/lib/server.js +0 -41
- package/lib/server.js +0 -16
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"automated testing",
|
|
8
8
|
"android"
|
|
9
9
|
],
|
|
10
|
-
"version": "2.
|
|
10
|
+
"version": "2.4.0",
|
|
11
11
|
"author": "appium",
|
|
12
12
|
"license": "Apache-2.0",
|
|
13
13
|
"repository": {
|
|
@@ -40,11 +40,9 @@
|
|
|
40
40
|
"build/lib"
|
|
41
41
|
],
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@appium/base-driver": "^8.5.2",
|
|
44
|
-
"@appium/support": "^2.55.3",
|
|
45
43
|
"@babel/runtime": "^7.0.0",
|
|
46
44
|
"appium-adb": "^9.0.0",
|
|
47
|
-
"appium-android-driver": "^5.
|
|
45
|
+
"appium-android-driver": "^5.2.1",
|
|
48
46
|
"appium-chromedriver": "^5.0.2",
|
|
49
47
|
"appium-uiautomator2-server": "^5.6.0",
|
|
50
48
|
"asyncbox": "^2.3.1",
|
|
@@ -70,16 +68,19 @@
|
|
|
70
68
|
"lint": "gulp lint",
|
|
71
69
|
"lint:fix": "gulp eslint --fix",
|
|
72
70
|
"precommit-msg": "echo 'Pre-commit checks...' && exit 0",
|
|
73
|
-
"e2e": "gulp transpile && mocha -t 6400000 -R spec build/test/functional
|
|
74
|
-
"e2e:find": "gulp transpile && mocha -t 6400000 -R spec build/test/functional/
|
|
75
|
-
"e2e:keyboard": "gulp transpile && mocha -t 6400000 -R spec build/test/functional/
|
|
76
|
-
"e2e:commands": "gulp transpile && mocha -t 6400000 -R spec build/test/functional/
|
|
71
|
+
"e2e": "gulp transpile && mocha -t 6400000 -R spec build/test/functional/**/*-specs.js build/test/functional/*-specs.js",
|
|
72
|
+
"e2e:find": "gulp transpile && mocha -t 6400000 -R spec build/test/functional/commands/find/*-specs.js",
|
|
73
|
+
"e2e:keyboard": "gulp transpile && mocha -t 6400000 -R spec build/test/functional/commands/keyboard/*-specs.js",
|
|
74
|
+
"e2e:commands": "gulp transpile && mocha -t 6400000 -R spec build/test/functional/commands/*-specs.js",
|
|
77
75
|
"e2e:testobject": "cross-env TESTOBJECT_E2E_TESTS=true npm run e2e"
|
|
78
76
|
},
|
|
79
77
|
"pre-commit": [
|
|
80
78
|
"precommit-msg",
|
|
81
79
|
"test"
|
|
82
80
|
],
|
|
81
|
+
"peerDependencies": {
|
|
82
|
+
"appium": "^2.0.0-beta.40"
|
|
83
|
+
},
|
|
83
84
|
"devDependencies": {
|
|
84
85
|
"@appium/gulp-plugins": "^7.0.0",
|
|
85
86
|
"@appium/eslint-config-appium": "^6.0.0",
|
package/build/lib/server.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
exports.startServer = startServer;
|
|
10
|
-
|
|
11
|
-
require("source-map-support/register");
|
|
12
|
-
|
|
13
|
-
var _logger = _interopRequireDefault(require("./logger"));
|
|
14
|
-
|
|
15
|
-
var _baseDriver = require("@appium/base-driver");
|
|
16
|
-
|
|
17
|
-
var _driver = _interopRequireDefault(require("./driver"));
|
|
18
|
-
|
|
19
|
-
async function startServer(port = 4884, host = 'localhost') {
|
|
20
|
-
let d = new _driver.default({
|
|
21
|
-
port,
|
|
22
|
-
host
|
|
23
|
-
});
|
|
24
|
-
let routeConfiguringFunction = (0, _baseDriver.routeConfiguringFunction)(d);
|
|
25
|
-
let server = (0, _baseDriver.server)({
|
|
26
|
-
routeConfiguringFunction,
|
|
27
|
-
port,
|
|
28
|
-
hostname: host
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
_logger.default.info(`Android Uiautomator2 server listening on http://${host}:${port}`);
|
|
32
|
-
|
|
33
|
-
d.server = server;
|
|
34
|
-
return await server;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
var _default = startServer;
|
|
38
|
-
exports.default = _default;require('source-map-support').install();
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGliL3NlcnZlci5qcyIsIm5hbWVzIjpbInN0YXJ0U2VydmVyIiwicG9ydCIsImhvc3QiLCJkIiwiQW5kcm9pZFVpYXV0b21hdG9yMkRyaXZlciIsInJvdXRlQ29uZmlndXJpbmdGdW5jdGlvbiIsIm1ha2VSb3V0ZXIiLCJzZXJ2ZXIiLCJiYXNlU2VydmVyIiwiaG9zdG5hbWUiLCJsb2ciLCJpbmZvIl0sInNvdXJjZVJvb3QiOiIuLi8uLiIsInNvdXJjZXMiOlsibGliL3NlcnZlci5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgbG9nIGZyb20gJy4vbG9nZ2VyJztcbmltcG9ydCB7IHN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JQUFJRyx3QkFBd0IsR0FBRyxJQUFBQyxvQ0FBQSxFQUFXSCxDQUFYLENBQS9CO0VBQ0EsSUFBSUksTUFBTSxHQUFHLElBQUFDLGtCQUFBLEVBQVc7SUFBQ0gsd0JBQUQ7SUFBMkJKLElBQTNCO0lBQWlDUSxRQUFRLEVBQUVQO0VBQTNDLENBQVgsQ0FBYjs7RUFDQVEsZUFBQSxDQUFJQyxJQUFKLENBQVUsbURBQWtEVCxJQUFLLElBQUdELElBQUssRUFBekU7O0VBQ0FFLENBQUMsQ0FBQ0ksTUFBRixHQUFXQSxNQUFYO0VBQ0EsT0FBTyxNQUFNQSxNQUFiO0FBQ0Q7O2VBR2NQLFcifQ==
|
package/lib/server.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import log from './logger';
|
|
2
|
-
import { server as baseServer, routeConfiguringFunction as makeRouter } from '@appium/base-driver';
|
|
3
|
-
import AndroidUiautomator2Driver from './driver';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
async function startServer (port = 4884, host = 'localhost') {
|
|
7
|
-
let d = new AndroidUiautomator2Driver({port, host});
|
|
8
|
-
let routeConfiguringFunction = makeRouter(d);
|
|
9
|
-
let server = baseServer({routeConfiguringFunction, port, hostname: host});
|
|
10
|
-
log.info(`Android Uiautomator2 server listening on http://${host}:${port}`);
|
|
11
|
-
d.server = server;
|
|
12
|
-
return await server;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export { startServer };
|
|
16
|
-
export default startServer;
|