appium-uiautomator2-driver 2.29.11 → 2.31.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/CHANGELOG.md +14 -0
- package/build/index.d.ts +4 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +8 -15
- package/build/index.js.map +1 -0
- package/build/lib/commands/actions.d.ts +2 -0
- package/build/lib/commands/actions.d.ts.map +1 -0
- package/build/lib/commands/actions.js +67 -62
- package/build/lib/commands/actions.js.map +1 -1
- package/build/lib/commands/alert.d.ts +2 -0
- package/build/lib/commands/alert.d.ts.map +1 -0
- package/build/lib/commands/alert.js +28 -26
- package/build/lib/commands/alert.js.map +1 -1
- package/build/lib/commands/app-strings.d.ts +3 -0
- package/build/lib/commands/app-strings.d.ts.map +1 -0
- package/build/lib/commands/app-strings.js +86 -57
- package/build/lib/commands/app-strings.js.map +1 -1
- package/build/lib/commands/battery.d.ts +2 -0
- package/build/lib/commands/battery.d.ts.map +1 -0
- package/build/lib/commands/battery.js +26 -16
- package/build/lib/commands/battery.js.map +1 -1
- package/build/lib/commands/element.d.ts +2 -0
- package/build/lib/commands/element.d.ts.map +1 -0
- package/build/lib/commands/element.js +140 -159
- package/build/lib/commands/element.js.map +1 -1
- package/build/lib/commands/find.d.ts +2 -0
- package/build/lib/commands/find.d.ts.map +1 -0
- package/build/lib/commands/find.js +39 -25
- package/build/lib/commands/find.js.map +1 -1
- package/build/lib/commands/general.d.ts +4 -0
- package/build/lib/commands/general.d.ts.map +1 -0
- package/build/lib/commands/general.js +209 -215
- package/build/lib/commands/general.js.map +1 -1
- package/build/lib/commands/gestures.d.ts +2 -0
- package/build/lib/commands/gestures.d.ts.map +1 -0
- package/build/lib/commands/gestures.js +206 -193
- package/build/lib/commands/gestures.js.map +1 -1
- package/build/lib/commands/index.d.ts +2 -0
- package/build/lib/commands/index.d.ts.map +1 -0
- package/build/lib/commands/index.js +13 -22
- package/build/lib/commands/index.js.map +1 -1
- package/build/lib/commands/mixins.d.ts +87 -0
- package/build/lib/commands/mixins.d.ts.map +1 -0
- package/build/lib/commands/mixins.js +26 -0
- package/build/lib/commands/mixins.js.map +1 -0
- package/build/lib/commands/screenshot.d.ts +2 -0
- package/build/lib/commands/screenshot.d.ts.map +1 -0
- package/build/lib/commands/screenshot.js +77 -62
- package/build/lib/commands/screenshot.js.map +1 -1
- package/build/lib/commands/touch.d.ts +2 -0
- package/build/lib/commands/touch.d.ts.map +1 -0
- package/build/lib/commands/touch.js +48 -38
- package/build/lib/commands/touch.js.map +1 -1
- package/build/lib/commands/types.d.ts +452 -0
- package/build/lib/commands/types.d.ts.map +1 -0
- package/build/lib/commands/types.js +3 -0
- package/build/lib/commands/types.js.map +1 -0
- package/build/lib/commands/viewport.d.ts +2 -0
- package/build/lib/commands/viewport.d.ts.map +1 -0
- package/build/lib/commands/viewport.js +37 -35
- package/build/lib/commands/viewport.js.map +1 -1
- package/build/lib/constraints.d.ts +325 -0
- package/build/lib/constraints.d.ts.map +1 -0
- package/build/lib/constraints.js +51 -0
- package/build/lib/constraints.js.map +1 -0
- package/build/lib/css-converter.d.ts +45 -0
- package/build/lib/css-converter.d.ts.map +1 -0
- package/build/lib/css-converter.js +272 -175
- package/build/lib/css-converter.js.map +1 -1
- package/build/lib/driver.d.ts +904 -0
- package/build/lib/driver.d.ts.map +1 -0
- package/build/lib/driver.js +726 -485
- package/build/lib/driver.js.map +1 -1
- package/build/lib/execute-method-map.d.ts +477 -0
- package/build/lib/execute-method-map.d.ts.map +1 -0
- package/build/lib/execute-method-map.js +542 -0
- package/build/lib/execute-method-map.js.map +1 -0
- package/build/lib/extensions.d.ts +3 -0
- package/build/lib/extensions.d.ts.map +1 -0
- package/build/lib/extensions.js +7 -9
- package/build/lib/extensions.js.map +1 -1
- package/build/lib/helpers.d.ts +7 -0
- package/build/lib/helpers.d.ts.map +1 -0
- package/build/lib/helpers.js +36 -29
- package/build/lib/helpers.js.map +1 -1
- package/build/lib/logger.d.ts +3 -0
- package/build/lib/logger.d.ts.map +1 -0
- package/build/lib/logger.js +5 -10
- package/build/lib/logger.js.map +1 -1
- package/build/lib/method-map.d.ts +389 -0
- package/build/lib/method-map.d.ts.map +1 -0
- package/build/lib/method-map.js +11 -17
- package/build/lib/method-map.js.map +1 -1
- package/build/lib/types.d.ts +44 -0
- package/build/lib/types.d.ts.map +1 -0
- package/build/lib/types.js +3 -0
- package/build/lib/types.js.map +1 -0
- package/build/lib/uiautomator2.d.ts +45 -0
- package/build/lib/uiautomator2.d.ts.map +1 -0
- package/build/lib/uiautomator2.js +340 -299
- package/build/lib/uiautomator2.js.map +1 -1
- package/build/lib/utils.d.ts +10 -0
- package/build/lib/utils.d.ts.map +1 -0
- package/build/lib/utils.js +23 -16
- package/build/lib/utils.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -0
- package/index.js +5 -3
- package/lib/commands/actions.js +115 -101
- package/lib/commands/alert.js +36 -44
- package/lib/commands/app-strings.js +79 -58
- package/lib/commands/battery.js +27 -28
- package/lib/commands/element.js +231 -134
- package/lib/commands/find.js +40 -21
- package/lib/commands/general.js +262 -336
- package/lib/commands/gestures.js +252 -366
- package/lib/commands/index.js +11 -31
- package/lib/commands/mixins.ts +169 -0
- package/lib/commands/screenshot.js +80 -76
- package/lib/commands/touch.js +64 -31
- package/lib/commands/types.ts +473 -0
- package/lib/commands/viewport.js +43 -31
- package/lib/constraints.ts +53 -0
- package/lib/css-converter.js +9 -1
- package/lib/{driver.js → driver.ts} +374 -239
- package/lib/execute-method-map.ts +573 -0
- package/lib/method-map.ts +11 -0
- package/lib/types.ts +57 -0
- package/lib/uiautomator2.js +21 -2
- package/lib/utils.js +2 -2
- package/npm-shrinkwrap.json +395 -528
- package/package.json +96 -70
- package/build/lib/desired-caps.js +0 -71
- package/build/lib/desired-caps.js.map +0 -1
- package/lib/desired-caps.js +0 -70
- package/lib/method-map.js +0 -11
package/build/lib/helpers.js
CHANGED
|
@@ -1,38 +1,45 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
require("source-map-support/register");
|
|
9
|
-
var _path = _interopRequireDefault(require("path"));
|
|
10
|
-
var _support = require("appium/support");
|
|
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
|
+
const path_1 = __importDefault(require("path"));
|
|
7
|
+
const support_1 = require("appium/support");
|
|
11
8
|
let helpers = {};
|
|
12
9
|
helpers.ensureInternetPermissionForApp = async function (adb, app) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
let has = await adb.hasInternetPermissionFromManifest(app);
|
|
11
|
+
if (has) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
let msg = 'Your apk does not have INTERNET permissions. Uiautomator2 needs ' +
|
|
15
|
+
'the internet permission to proceed. Please check if you have ' +
|
|
16
|
+
'<uses-permission android:name="android.**permission.INTERNET"/>' +
|
|
17
|
+
'in your AndroidManifest.xml';
|
|
18
|
+
throw new Error(msg);
|
|
19
19
|
};
|
|
20
20
|
helpers.isWriteable = async function isWriteable(filePath) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
try {
|
|
22
|
+
await support_1.fs.access(filePath, support_1.fs.W_OK);
|
|
23
|
+
if (support_1.system.isWindows()) {
|
|
24
|
+
// On operating systems, where access-control policies may
|
|
25
|
+
// limit access to the file system, `fs.access` does not work
|
|
26
|
+
// as expected. See https://groups.google.com/forum/#!topic/nodejs/qmZtIwDRSYo
|
|
27
|
+
// for more details
|
|
28
|
+
await support_1.fs.close(await support_1.fs.open(filePath, 'r+'));
|
|
29
|
+
}
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
catch (ign) {
|
|
33
|
+
return false;
|
|
25
34
|
}
|
|
26
|
-
return true;
|
|
27
|
-
} catch (ign) {
|
|
28
|
-
return false;
|
|
29
|
-
}
|
|
30
35
|
};
|
|
31
36
|
helpers.signApp = async function (adb, appPath) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
37
|
+
if (!await this.isWriteable(appPath)) {
|
|
38
|
+
throw new Error(`The application at '${appPath}' is not writeable. ` +
|
|
39
|
+
`Please grant write permissions to this file or to its parent folder '${path_1.default.dirname(appPath)}' ` +
|
|
40
|
+
`for the Appium process, so it could sign the application`);
|
|
41
|
+
}
|
|
42
|
+
await adb.sign(appPath);
|
|
36
43
|
};
|
|
37
|
-
|
|
38
|
-
//# sourceMappingURL=
|
|
44
|
+
exports.default = helpers;
|
|
45
|
+
//# sourceMappingURL=helpers.js.map
|
package/build/lib/helpers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../lib/helpers.js"],"names":[],"mappings":";;;;;AAAA,gDAAwB;AACxB,4CAA4C;AAG5C,IAAI,OAAO,GAAG,EAAE,CAAC;AAEjB,OAAO,CAAC,8BAA8B,GAAG,KAAK,WAAW,GAAG,EAAE,GAAG;IAC/D,IAAI,GAAG,GAAG,MAAM,GAAG,CAAC,iCAAiC,CAAC,GAAG,CAAC,CAAC;IAC3D,IAAI,GAAG,EAAE;QACP,OAAO;KACR;IACD,IAAI,GAAG,GAAG,kEAAkE;QAClE,+DAA+D;QAC/D,iEAAiE;QACjE,6BAA6B,CAAC;IACxC,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC;AACvB,CAAC,CAAC;AAEF,OAAO,CAAC,WAAW,GAAG,KAAK,UAAU,WAAW,CAAE,QAAQ;IACxD,IAAI;QACF,MAAM,YAAE,CAAC,MAAM,CAAC,QAAQ,EAAE,YAAE,CAAC,IAAI,CAAC,CAAC;QACnC,IAAI,gBAAM,CAAC,SAAS,EAAE,EAAE;YACtB,0DAA0D;YAC1D,6DAA6D;YAC7D,8EAA8E;YAC9E,mBAAmB;YACnB,MAAM,YAAE,CAAC,KAAK,CAAC,MAAM,YAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC;SAC/C;QACD,OAAO,IAAI,CAAC;KACb;IAAC,OAAO,GAAG,EAAE;QACZ,OAAO,KAAK,CAAC;KACd;AACH,CAAC,CAAC;AAEF,OAAO,CAAC,OAAO,GAAG,KAAK,WAAW,GAAG,EAAE,OAAO;IAC5C,IAAI,CAAC,MAAM,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE;QACpC,MAAM,IAAI,KAAK,CAAC,uBAAuB,OAAO,sBAAsB;YAClE,wEAAwE,cAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI;YACjG,0DAA0D,CAAC,CAAC;KAC/D;IACD,MAAM,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAC1B,CAAC,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../lib/logger.js"],"names":[],"mappings":";AAGA,wDAA6C"}
|
package/build/lib/logger.js
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
require("source-map-support/register");
|
|
8
|
-
var _support = require("appium/support");
|
|
9
|
-
const log = _support.logger.getLogger('UiAutomator2');
|
|
10
|
-
var _default = exports.default = log;
|
|
11
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfc3VwcG9ydCIsInJlcXVpcmUiLCJsb2ciLCJsb2dnZXIiLCJnZXRMb2dnZXIiLCJfZGVmYXVsdCIsImV4cG9ydHMiLCJkZWZhdWx0Il0sInNvdXJjZXMiOlsiLi4vLi4vbGliL2xvZ2dlci5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBsb2dnZXIgfSBmcm9tICdhcHBpdW0vc3VwcG9ydCc7XG5cblxuY29uc3QgbG9nID0gbG9nZ2VyLmdldExvZ2dlcignVWlBdXRvbWF0b3IyJyk7XG5cbmV4cG9ydCBkZWZhdWx0IGxvZztcbiJdLCJtYXBwaW5ncyI6Ijs7Ozs7OztBQUFBLElBQUFBLFFBQUEsR0FBQUMsT0FBQTtBQUdBLE1BQU1DLEdBQUcsR0FBR0MsZUFBTSxDQUFDQyxTQUFTLENBQUMsY0FBYyxDQUFDO0FBQUMsSUFBQUMsUUFBQSxHQUFBQyxPQUFBLENBQUFDLE9BQUEsR0FFOUJMLEdBQUcifQ==
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const support_1 = require("appium/support");
|
|
4
|
+
const log = support_1.logger.getLogger('UiAutomator2');
|
|
5
|
+
exports.default = log;
|
|
6
|
+
//# sourceMappingURL=logger.js.map
|
package/build/lib/logger.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.js","
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../lib/logger.js"],"names":[],"mappings":";;AAAA,4CAAwC;AAGxC,MAAM,GAAG,GAAG,gBAAM,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;AAE7C,kBAAe,GAAG,CAAC"}
|
|
@@ -0,0 +1,389 @@
|
|
|
1
|
+
export declare const newMethodMap: {
|
|
2
|
+
readonly '/session/:sessionId/appium/device/get_clipboard': {
|
|
3
|
+
readonly POST: {
|
|
4
|
+
readonly command: "getClipboard";
|
|
5
|
+
readonly payloadParams: {
|
|
6
|
+
readonly optional: readonly ["contentType"];
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
readonly '/session/:sessionId/timeouts/implicit_wait': {
|
|
11
|
+
readonly POST: {
|
|
12
|
+
readonly command: "implicitWait";
|
|
13
|
+
readonly payloadParams: {
|
|
14
|
+
readonly required: readonly ["ms"];
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
readonly '/session/:sessionId/ime/available_engines': {
|
|
19
|
+
readonly GET: {
|
|
20
|
+
readonly command: "availableIMEEngines";
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
readonly '/session/:sessionId/ime/active_engine': {
|
|
24
|
+
readonly GET: {
|
|
25
|
+
readonly command: "getActiveIMEEngine";
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
readonly '/session/:sessionId/ime/activated': {
|
|
29
|
+
readonly GET: {
|
|
30
|
+
readonly command: "isIMEActivated";
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
readonly '/session/:sessionId/ime/deactivate': {
|
|
34
|
+
readonly POST: {
|
|
35
|
+
readonly command: "deactivateIMEEngine";
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
readonly '/session/:sessionId/ime/activate': {
|
|
39
|
+
readonly POST: {
|
|
40
|
+
readonly command: "activateIMEEngine";
|
|
41
|
+
readonly payloadParams: {
|
|
42
|
+
readonly required: readonly ["engine"];
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
readonly '/session/:sessionId/window/:windowhandle/size': {
|
|
47
|
+
readonly GET: {
|
|
48
|
+
readonly command: "getWindowSize";
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
readonly '/session/:sessionId/keys': {
|
|
52
|
+
readonly POST: {
|
|
53
|
+
readonly command: "keys";
|
|
54
|
+
readonly payloadParams: {
|
|
55
|
+
readonly required: readonly ["value"];
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
readonly '/session/:sessionId/element/:elementId/location': {
|
|
60
|
+
readonly GET: {
|
|
61
|
+
readonly command: "getLocation";
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
readonly '/session/:sessionId/element/:elementId/location_in_view': {
|
|
65
|
+
readonly GET: {
|
|
66
|
+
readonly command: "getLocationInView";
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
readonly '/session/:sessionId/element/:elementId/size': {
|
|
70
|
+
readonly GET: {
|
|
71
|
+
readonly command: "getSize";
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
readonly '/session/:sessionId/touch/click': {
|
|
75
|
+
readonly POST: {
|
|
76
|
+
readonly command: "click";
|
|
77
|
+
readonly payloadParams: {
|
|
78
|
+
readonly required: readonly ["element"];
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
readonly '/session/:sessionId/touch/down': {
|
|
83
|
+
readonly POST: {
|
|
84
|
+
readonly command: "touchDown";
|
|
85
|
+
readonly payloadParams: {
|
|
86
|
+
readonly required: readonly ["x", "y"];
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
readonly '/session/:sessionId/touch/up': {
|
|
91
|
+
readonly POST: {
|
|
92
|
+
readonly command: "touchUp";
|
|
93
|
+
readonly payloadParams: {
|
|
94
|
+
readonly required: readonly ["x", "y"];
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
readonly '/session/:sessionId/touch/move': {
|
|
99
|
+
readonly POST: {
|
|
100
|
+
readonly command: "touchMove";
|
|
101
|
+
readonly payloadParams: {
|
|
102
|
+
readonly required: readonly ["x", "y"];
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
readonly '/session/:sessionId/touch/longclick': {
|
|
107
|
+
readonly POST: {
|
|
108
|
+
readonly command: "touchLongClick";
|
|
109
|
+
readonly payloadParams: {
|
|
110
|
+
readonly required: readonly ["elements"];
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
readonly '/session/:sessionId/touch/flick': {
|
|
115
|
+
readonly POST: {
|
|
116
|
+
readonly command: "flick";
|
|
117
|
+
readonly payloadParams: {
|
|
118
|
+
readonly optional: readonly ["element", "xspeed", "yspeed", "xoffset", "yoffset", "speed"];
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
readonly '/session/:sessionId/touch/perform': {
|
|
123
|
+
readonly POST: {
|
|
124
|
+
readonly command: "performTouch";
|
|
125
|
+
readonly payloadParams: {
|
|
126
|
+
readonly wrap: "actions";
|
|
127
|
+
readonly required: readonly ["actions"];
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
readonly '/session/:sessionId/touch/multi/perform': {
|
|
132
|
+
readonly POST: {
|
|
133
|
+
readonly command: "performMultiAction";
|
|
134
|
+
readonly payloadParams: {
|
|
135
|
+
readonly required: readonly ["actions"];
|
|
136
|
+
readonly optional: readonly ["elementId"];
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
readonly '/session/:sessionId/appium/device/lock': {
|
|
141
|
+
readonly POST: {
|
|
142
|
+
readonly command: "lock";
|
|
143
|
+
readonly payloadParams: {
|
|
144
|
+
readonly optional: readonly ["seconds"];
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
readonly '/session/:sessionId/appium/device/unlock': {
|
|
149
|
+
readonly POST: {
|
|
150
|
+
readonly command: "unlock";
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
readonly '/session/:sessionId/appium/device/is_locked': {
|
|
154
|
+
readonly POST: {
|
|
155
|
+
readonly command: "isLocked";
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
readonly '/session/:sessionId/appium/start_recording_screen': {
|
|
159
|
+
readonly POST: {
|
|
160
|
+
readonly command: "startRecordingScreen";
|
|
161
|
+
readonly payloadParams: {
|
|
162
|
+
readonly optional: readonly ["options"];
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
readonly '/session/:sessionId/appium/stop_recording_screen': {
|
|
167
|
+
readonly POST: {
|
|
168
|
+
readonly command: "stopRecordingScreen";
|
|
169
|
+
readonly payloadParams: {
|
|
170
|
+
readonly optional: readonly ["options"];
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
readonly '/session/:sessionId/appium/performanceData/types': {
|
|
175
|
+
readonly POST: {
|
|
176
|
+
readonly command: "getPerformanceDataTypes";
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
readonly '/session/:sessionId/appium/getPerformanceData': {
|
|
180
|
+
readonly POST: {
|
|
181
|
+
readonly command: "getPerformanceData";
|
|
182
|
+
readonly payloadParams: {
|
|
183
|
+
readonly required: readonly ["packageName", "dataType"];
|
|
184
|
+
readonly optional: readonly ["dataReadTimeout"];
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
readonly '/session/:sessionId/appium/device/press_keycode': {
|
|
189
|
+
readonly POST: {
|
|
190
|
+
readonly command: "pressKeyCode";
|
|
191
|
+
readonly payloadParams: {
|
|
192
|
+
readonly required: readonly ["keycode"];
|
|
193
|
+
readonly optional: readonly ["metastate", "flags"];
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
readonly '/session/:sessionId/appium/device/long_press_keycode': {
|
|
198
|
+
readonly POST: {
|
|
199
|
+
readonly command: "longPressKeyCode";
|
|
200
|
+
readonly payloadParams: {
|
|
201
|
+
readonly required: readonly ["keycode"];
|
|
202
|
+
readonly optional: readonly ["metastate", "flags"];
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
};
|
|
206
|
+
readonly '/session/:sessionId/appium/device/finger_print': {
|
|
207
|
+
readonly POST: {
|
|
208
|
+
readonly command: "fingerprint";
|
|
209
|
+
readonly payloadParams: {
|
|
210
|
+
readonly required: readonly ["fingerprintId"];
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
};
|
|
214
|
+
readonly '/session/:sessionId/appium/device/send_sms': {
|
|
215
|
+
readonly POST: {
|
|
216
|
+
readonly command: "sendSMS";
|
|
217
|
+
readonly payloadParams: {
|
|
218
|
+
readonly required: readonly ["phoneNumber", "message"];
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
readonly '/session/:sessionId/appium/device/gsm_call': {
|
|
223
|
+
readonly POST: {
|
|
224
|
+
readonly command: "gsmCall";
|
|
225
|
+
readonly payloadParams: {
|
|
226
|
+
readonly required: readonly ["phoneNumber", "action"];
|
|
227
|
+
};
|
|
228
|
+
};
|
|
229
|
+
};
|
|
230
|
+
readonly '/session/:sessionId/appium/device/gsm_signal': {
|
|
231
|
+
readonly POST: {
|
|
232
|
+
readonly command: "gsmSignal";
|
|
233
|
+
readonly payloadParams: {
|
|
234
|
+
readonly required: readonly ["signalStrength"];
|
|
235
|
+
};
|
|
236
|
+
};
|
|
237
|
+
};
|
|
238
|
+
readonly '/session/:sessionId/appium/device/gsm_voice': {
|
|
239
|
+
readonly POST: {
|
|
240
|
+
readonly command: "gsmVoice";
|
|
241
|
+
readonly payloadParams: {
|
|
242
|
+
readonly required: readonly ["state"];
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
readonly '/session/:sessionId/appium/device/power_capacity': {
|
|
247
|
+
readonly POST: {
|
|
248
|
+
readonly command: "powerCapacity";
|
|
249
|
+
readonly payloadParams: {
|
|
250
|
+
readonly required: readonly ["percent"];
|
|
251
|
+
};
|
|
252
|
+
};
|
|
253
|
+
};
|
|
254
|
+
readonly '/session/:sessionId/appium/device/power_ac': {
|
|
255
|
+
readonly POST: {
|
|
256
|
+
readonly command: "powerAC";
|
|
257
|
+
readonly payloadParams: {
|
|
258
|
+
readonly required: readonly ["state"];
|
|
259
|
+
};
|
|
260
|
+
};
|
|
261
|
+
};
|
|
262
|
+
readonly '/session/:sessionId/appium/device/network_speed': {
|
|
263
|
+
readonly POST: {
|
|
264
|
+
readonly command: "networkSpeed";
|
|
265
|
+
readonly payloadParams: {
|
|
266
|
+
readonly required: readonly ["netspeed"];
|
|
267
|
+
};
|
|
268
|
+
};
|
|
269
|
+
};
|
|
270
|
+
readonly '/session/:sessionId/appium/device/keyevent': {
|
|
271
|
+
readonly POST: {
|
|
272
|
+
readonly command: "keyevent";
|
|
273
|
+
readonly payloadParams: {
|
|
274
|
+
readonly required: readonly ["keycode"];
|
|
275
|
+
readonly optional: readonly ["metastate"];
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
};
|
|
279
|
+
readonly '/session/:sessionId/appium/device/current_activity': {
|
|
280
|
+
readonly GET: {
|
|
281
|
+
readonly command: "getCurrentActivity";
|
|
282
|
+
};
|
|
283
|
+
};
|
|
284
|
+
readonly '/session/:sessionId/appium/device/current_package': {
|
|
285
|
+
readonly GET: {
|
|
286
|
+
readonly command: "getCurrentPackage";
|
|
287
|
+
};
|
|
288
|
+
};
|
|
289
|
+
readonly '/session/:sessionId/appium/device/app_state': {
|
|
290
|
+
readonly POST: {
|
|
291
|
+
readonly command: "queryAppState";
|
|
292
|
+
readonly payloadParams: {
|
|
293
|
+
readonly required: readonly [readonly ["appId"], readonly ["bundleId"]];
|
|
294
|
+
};
|
|
295
|
+
};
|
|
296
|
+
};
|
|
297
|
+
readonly '/session/:sessionId/appium/device/toggle_airplane_mode': {
|
|
298
|
+
readonly POST: {
|
|
299
|
+
readonly command: "toggleFlightMode";
|
|
300
|
+
};
|
|
301
|
+
};
|
|
302
|
+
readonly '/session/:sessionId/appium/device/toggle_data': {
|
|
303
|
+
readonly POST: {
|
|
304
|
+
readonly command: "toggleData";
|
|
305
|
+
};
|
|
306
|
+
};
|
|
307
|
+
readonly '/session/:sessionId/appium/device/toggle_wifi': {
|
|
308
|
+
readonly POST: {
|
|
309
|
+
readonly command: "toggleWiFi";
|
|
310
|
+
};
|
|
311
|
+
};
|
|
312
|
+
readonly '/session/:sessionId/appium/device/toggle_location_services': {
|
|
313
|
+
readonly POST: {
|
|
314
|
+
readonly command: "toggleLocationServices";
|
|
315
|
+
};
|
|
316
|
+
};
|
|
317
|
+
readonly '/session/:sessionId/appium/device/open_notifications': {
|
|
318
|
+
readonly POST: {
|
|
319
|
+
readonly command: "openNotifications";
|
|
320
|
+
};
|
|
321
|
+
};
|
|
322
|
+
readonly '/session/:sessionId/appium/device/start_activity': {
|
|
323
|
+
readonly POST: {
|
|
324
|
+
readonly command: "startActivity";
|
|
325
|
+
readonly payloadParams: {
|
|
326
|
+
readonly required: readonly ["appPackage", "appActivity"];
|
|
327
|
+
readonly optional: readonly ["appWaitPackage", "appWaitActivity", "intentAction", "intentCategory", "intentFlags", "optionalIntentArguments", "dontStopAppOnReset"];
|
|
328
|
+
};
|
|
329
|
+
};
|
|
330
|
+
};
|
|
331
|
+
readonly '/session/:sessionId/appium/device/system_bars': {
|
|
332
|
+
readonly GET: {
|
|
333
|
+
readonly command: "getSystemBars";
|
|
334
|
+
};
|
|
335
|
+
};
|
|
336
|
+
readonly '/session/:sessionId/appium/device/display_density': {
|
|
337
|
+
readonly GET: {
|
|
338
|
+
readonly command: "getDisplayDensity";
|
|
339
|
+
};
|
|
340
|
+
};
|
|
341
|
+
readonly '/session/:sessionId/appium/app/launch': {
|
|
342
|
+
readonly POST: {
|
|
343
|
+
readonly command: "launchApp";
|
|
344
|
+
};
|
|
345
|
+
};
|
|
346
|
+
readonly '/session/:sessionId/appium/app/close': {
|
|
347
|
+
readonly POST: {
|
|
348
|
+
readonly command: "closeApp";
|
|
349
|
+
};
|
|
350
|
+
};
|
|
351
|
+
readonly '/session/:sessionId/appium/app/reset': {
|
|
352
|
+
readonly POST: {
|
|
353
|
+
readonly command: "reset";
|
|
354
|
+
};
|
|
355
|
+
};
|
|
356
|
+
readonly '/session/:sessionId/appium/app/background': {
|
|
357
|
+
readonly POST: {
|
|
358
|
+
readonly command: "background";
|
|
359
|
+
readonly payloadParams: {
|
|
360
|
+
readonly required: readonly ["seconds"];
|
|
361
|
+
};
|
|
362
|
+
};
|
|
363
|
+
};
|
|
364
|
+
readonly '/session/:sessionId/appium/app/strings': {
|
|
365
|
+
readonly POST: {
|
|
366
|
+
readonly command: "getStrings";
|
|
367
|
+
readonly payloadParams: {
|
|
368
|
+
readonly optional: readonly ["language", "stringFile"];
|
|
369
|
+
};
|
|
370
|
+
};
|
|
371
|
+
};
|
|
372
|
+
readonly '/session/:sessionId/appium/element/:elementId/value': {
|
|
373
|
+
readonly POST: {
|
|
374
|
+
readonly command: "setValueImmediate";
|
|
375
|
+
readonly payloadParams: {
|
|
376
|
+
readonly required: readonly ["text"];
|
|
377
|
+
};
|
|
378
|
+
};
|
|
379
|
+
};
|
|
380
|
+
readonly '/session/:sessionId/appium/element/:elementId/replace_value': {
|
|
381
|
+
readonly POST: {
|
|
382
|
+
readonly command: "replaceValue";
|
|
383
|
+
readonly payloadParams: {
|
|
384
|
+
readonly required: readonly ["text"];
|
|
385
|
+
};
|
|
386
|
+
};
|
|
387
|
+
};
|
|
388
|
+
};
|
|
389
|
+
//# sourceMappingURL=method-map.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"method-map.d.ts","sourceRoot":"","sources":["../../lib/method-map.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQf,CAAC"}
|
package/build/lib/method-map.js
CHANGED
|
@@ -1,20 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.newMethodMap = void 0;
|
|
7
|
-
require("
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
4
|
+
const appium_android_driver_1 = require("appium-android-driver");
|
|
5
|
+
exports.newMethodMap = {
|
|
6
|
+
...appium_android_driver_1.AndroidDriver.newMethodMap,
|
|
7
|
+
'/session/:sessionId/appium/device/get_clipboard': {
|
|
8
|
+
POST: {
|
|
9
|
+
command: 'getClipboard',
|
|
10
|
+
payloadParams: { optional: ['contentType'] },
|
|
11
|
+
},
|
|
12
|
+
},
|
|
19
13
|
};
|
|
20
|
-
//# sourceMappingURL=
|
|
14
|
+
//# sourceMappingURL=method-map.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"method-map.js","
|
|
1
|
+
{"version":3,"file":"method-map.js","sourceRoot":"","sources":["../../lib/method-map.ts"],"names":[],"mappings":";;;AAAA,iEAAoD;AAEvC,QAAA,YAAY,GAAG;IAC1B,GAAG,qCAAa,CAAC,YAAY;IAC7B,iDAAiD,EAAE;QACjD,IAAI,EAAE;YACJ,OAAO,EAAE,cAAc;YACvB,aAAa,EAAE,EAAC,QAAQ,EAAE,CAAC,aAAa,CAAC,EAAC;SAC3C;KACF;CACO,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { DriverCaps, DriverOpts, W3CDriverCaps } from '@appium/types';
|
|
2
|
+
import type { EmptyObject } from 'type-fest';
|
|
3
|
+
import type { RelativeRect } from './commands/types';
|
|
4
|
+
import type { Uiautomator2Constraints } from './constraints';
|
|
5
|
+
export type Uiautomator2DriverOpts = DriverOpts<Uiautomator2Constraints>;
|
|
6
|
+
export type Uiautomator2DriverCaps = DriverCaps<Uiautomator2Constraints>;
|
|
7
|
+
export type W3CUiautomator2DriverCaps = W3CDriverCaps<Uiautomator2Constraints>;
|
|
8
|
+
export interface Uiautomator2DeviceInfo {
|
|
9
|
+
deviceApiLevel: number;
|
|
10
|
+
deviceScreenSize: string;
|
|
11
|
+
deviceScreenDensity: string;
|
|
12
|
+
deviceModel: string;
|
|
13
|
+
deviceManufacturer: string;
|
|
14
|
+
platformVersion: string;
|
|
15
|
+
}
|
|
16
|
+
export interface Uiautomator2SessionInfo {
|
|
17
|
+
deviceName: string;
|
|
18
|
+
deviceUDID: string;
|
|
19
|
+
}
|
|
20
|
+
export interface Uiautomator2DeviceDetails {
|
|
21
|
+
pixelRatio: string;
|
|
22
|
+
statBarHeight: number;
|
|
23
|
+
viewportRect: RelativeRect;
|
|
24
|
+
}
|
|
25
|
+
export interface Uiautomator2ServerInfo {
|
|
26
|
+
platform: 'LINUX';
|
|
27
|
+
webStorageEnabled: false;
|
|
28
|
+
takesScreenshot: true;
|
|
29
|
+
javascriptEnabled: true;
|
|
30
|
+
databaseEnabled: false;
|
|
31
|
+
networkConnectionEnabled: true;
|
|
32
|
+
locationContextEnabled: false;
|
|
33
|
+
warnings: EmptyObject;
|
|
34
|
+
desired: Uiautomator2DriverCaps;
|
|
35
|
+
}
|
|
36
|
+
export interface Uiautomator2StartSessionOpts extends Uiautomator2DriverCaps, Uiautomator2ServerInfo {
|
|
37
|
+
}
|
|
38
|
+
export interface Uiautomator2SessionCaps extends Uiautomator2ServerInfo, Uiautomator2SessionInfo, Uiautomator2DeviceInfo, Uiautomator2DeviceDetails {
|
|
39
|
+
}
|
|
40
|
+
export interface Uiautomator2Settings {
|
|
41
|
+
ignoreUnimportantViews: boolean;
|
|
42
|
+
allowInvisibleElements: boolean;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../lib/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,UAAU,EAAE,UAAU,EAAE,aAAa,EAAC,MAAM,eAAe,CAAC;AACzE,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,WAAW,CAAC;AAC3C,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAC,uBAAuB,EAAC,MAAM,eAAe,CAAC;AAE3D,MAAM,MAAM,sBAAsB,GAAG,UAAU,CAAC,uBAAuB,CAAC,CAAC;AAEzE,MAAM,MAAM,sBAAsB,GAAG,UAAU,CAAC,uBAAuB,CAAC,CAAC;AAEzE,MAAM,MAAM,yBAAyB,GAAG,aAAa,CAAC,uBAAuB,CAAC,CAAC;AAE/E,MAAM,WAAW,sBAAsB;IACrC,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,YAAY,CAAC;CAC5B;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,OAAO,CAAC;IAClB,iBAAiB,EAAE,KAAK,CAAC;IACzB,eAAe,EAAE,IAAI,CAAC;IACtB,iBAAiB,EAAE,IAAI,CAAC;IACxB,eAAe,EAAE,KAAK,CAAC;IACvB,wBAAwB,EAAE,IAAI,CAAC;IAC/B,sBAAsB,EAAE,KAAK,CAAC;IAC9B,QAAQ,EAAE,WAAW,CAAC;IACtB,OAAO,EAAE,sBAAsB,CAAC;CACjC;AAED,MAAM,WAAW,4BACf,SAAQ,sBAAsB,EAC5B,sBAAsB;CAAG;AAE7B,MAAM,WAAW,uBACf,SAAQ,sBAAsB,EAC5B,uBAAuB,EACvB,sBAAsB,EACtB,yBAAyB;CAAG;AAEhC,MAAM,WAAW,oBAAoB;IACnC,sBAAsB,EAAE,OAAO,CAAC;IAChC,sBAAsB,EAAE,OAAO,CAAC;CACjC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../lib/types.ts"],"names":[],"mappings":""}
|