@appium/base-driver 10.0.0-beta.0 → 10.0.0-beta.2
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 +0 -8
- package/build/lib/basedriver/capabilities.d.ts.map +1 -1
- package/build/lib/basedriver/capabilities.js +2 -4
- package/build/lib/basedriver/capabilities.js.map +1 -1
- package/build/lib/basedriver/commands/execute.js.map +1 -1
- package/build/lib/basedriver/commands/timeout.js +12 -31
- package/build/lib/basedriver/commands/timeout.js.map +1 -1
- package/build/lib/basedriver/core.d.ts +0 -8
- package/build/lib/basedriver/core.d.ts.map +1 -1
- package/build/lib/basedriver/core.js +8 -18
- package/build/lib/basedriver/core.js.map +1 -1
- package/build/lib/basedriver/driver.js +2 -2
- package/build/lib/basedriver/driver.js.map +1 -1
- package/build/lib/basedriver/helpers.d.ts +9 -1
- package/build/lib/basedriver/helpers.d.ts.map +1 -1
- package/build/lib/basedriver/helpers.js +56 -142
- package/build/lib/basedriver/helpers.js.map +1 -1
- package/build/lib/basedriver/validation.d.ts +7 -0
- package/build/lib/basedriver/validation.d.ts.map +1 -0
- package/build/lib/basedriver/validation.js +130 -0
- package/build/lib/basedriver/validation.js.map +1 -0
- package/build/lib/express/middleware.d.ts +0 -6
- package/build/lib/express/middleware.d.ts.map +1 -1
- package/build/lib/express/middleware.js +28 -60
- package/build/lib/express/middleware.js.map +1 -1
- package/build/lib/express/server.d.ts.map +1 -1
- package/build/lib/express/server.js +0 -1
- package/build/lib/express/server.js.map +1 -1
- package/build/lib/helpers/capabilities.d.ts +13 -6
- package/build/lib/helpers/capabilities.d.ts.map +1 -1
- package/build/lib/helpers/capabilities.js +7 -0
- package/build/lib/helpers/capabilities.js.map +1 -1
- package/build/lib/index.d.ts +1 -0
- package/build/lib/index.d.ts.map +1 -1
- package/build/lib/index.js +3 -1
- package/build/lib/index.js.map +1 -1
- package/build/lib/jsonwp-proxy/proxy.d.ts +0 -8
- package/build/lib/jsonwp-proxy/proxy.d.ts.map +1 -1
- package/build/lib/jsonwp-proxy/proxy.js +7 -38
- package/build/lib/jsonwp-proxy/proxy.js.map +1 -1
- package/build/lib/protocol/errors.d.ts +171 -277
- package/build/lib/protocol/errors.d.ts.map +1 -1
- package/build/lib/protocol/errors.js +201 -421
- package/build/lib/protocol/errors.js.map +1 -1
- package/build/lib/protocol/helpers.d.ts +6 -6
- package/build/lib/protocol/helpers.d.ts.map +1 -1
- package/build/lib/protocol/helpers.js +11 -7
- package/build/lib/protocol/helpers.js.map +1 -1
- package/build/lib/protocol/index.d.ts +2 -1
- package/build/lib/protocol/index.d.ts.map +1 -1
- package/build/lib/protocol/index.js +2 -1
- package/build/lib/protocol/index.js.map +1 -1
- package/build/lib/protocol/protocol.d.ts +16 -19
- package/build/lib/protocol/protocol.d.ts.map +1 -1
- package/build/lib/protocol/protocol.js +98 -119
- package/build/lib/protocol/protocol.js.map +1 -1
- package/build/lib/protocol/routes.d.ts +12 -714
- package/build/lib/protocol/routes.d.ts.map +1 -1
- package/build/lib/protocol/routes.js +24 -488
- package/build/lib/protocol/routes.js.map +1 -1
- package/build/lib/protocol/validators.d.ts +4 -7
- package/build/lib/protocol/validators.d.ts.map +1 -1
- package/build/lib/protocol/validators.js +4 -21
- package/build/lib/protocol/validators.js.map +1 -1
- package/lib/basedriver/capabilities.ts +2 -4
- package/lib/basedriver/commands/execute.ts +1 -1
- package/lib/basedriver/commands/timeout.ts +16 -43
- package/lib/basedriver/core.ts +10 -19
- package/lib/basedriver/driver.ts +3 -3
- package/lib/basedriver/helpers.js +61 -167
- package/lib/basedriver/validation.ts +145 -0
- package/lib/express/middleware.js +32 -70
- package/lib/express/server.js +0 -2
- package/lib/helpers/capabilities.js +9 -4
- package/lib/index.js +2 -0
- package/lib/jsonwp-proxy/proxy.js +8 -45
- package/lib/protocol/{errors.js → errors.ts} +322 -436
- package/lib/protocol/helpers.js +12 -8
- package/lib/protocol/index.js +8 -1
- package/lib/protocol/{protocol.js → protocol.ts} +147 -146
- package/lib/protocol/routes.js +26 -498
- package/lib/protocol/validators.ts +19 -0
- package/package.json +10 -11
- package/build/lib/basedriver/desired-caps.d.ts +0 -5
- package/build/lib/basedriver/desired-caps.d.ts.map +0 -1
- package/build/lib/basedriver/desired-caps.js +0 -92
- package/build/lib/basedriver/desired-caps.js.map +0 -1
- package/lib/basedriver/README.md +0 -36
- package/lib/basedriver/desired-caps.js +0 -103
- package/lib/express/README.md +0 -59
- package/lib/jsonwp-proxy/README.md +0 -52
- package/lib/jsonwp-status/README.md +0 -20
- package/lib/protocol/README.md +0 -100
- package/lib/protocol/validators.js +0 -38
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../lib/protocol/routes.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../lib/protocol/routes.js"],"names":[],"mappings":"AA0dA;;;;;;GAMG;AACH,6CALW,MAAM,WACN,OAAO,eAAe,EAAE,UAAU,aAClC,MAAM,GACJ,MAAM,GAAC,SAAS,CA8C5B;AAngBD;;;;;GAKG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmcG;AAGH,iCAEyB;AAkEzB,8CAA0F"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// @ts-check
|
|
3
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
4
|
};
|
|
@@ -7,7 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
7
6
|
exports.NO_SESSION_ID_COMMANDS = exports.ALL_COMMANDS = exports.METHOD_MAP = void 0;
|
|
8
7
|
exports.routeToCommandName = routeToCommandName;
|
|
9
8
|
const lodash_1 = __importDefault(require("lodash"));
|
|
10
|
-
const support_1 = require("@appium/support");
|
|
11
9
|
const constants_1 = require("../constants");
|
|
12
10
|
const path_to_regexp_1 = require("path-to-regexp");
|
|
13
11
|
const lru_cache_1 = require("lru-cache");
|
|
@@ -15,14 +13,6 @@ const lru_cache_1 = require("lru-cache");
|
|
|
15
13
|
const COMMAND_NAMES_CACHE = new lru_cache_1.LRUCache({
|
|
16
14
|
max: 1024,
|
|
17
15
|
});
|
|
18
|
-
const SET_ALERT_TEXT_PAYLOAD_PARAMS = {
|
|
19
|
-
validate: (jsonObj) => !support_1.util.hasValue(jsonObj.value) &&
|
|
20
|
-
!support_1.util.hasValue(jsonObj.text) &&
|
|
21
|
-
'either "text" or "value" must be set',
|
|
22
|
-
optional: ['value', 'text'],
|
|
23
|
-
// Prefer 'value' since it's more backward-compatible.
|
|
24
|
-
makeArgs: (jsonObj) => [jsonObj.value || jsonObj.text],
|
|
25
|
-
};
|
|
26
16
|
/**
|
|
27
17
|
* define the routes, mapping of HTTP methods to particular driver commands, and
|
|
28
18
|
* any parameters that are expected in a request parameters can be `required` or
|
|
@@ -31,7 +21,7 @@ const SET_ALERT_TEXT_PAYLOAD_PARAMS = {
|
|
|
31
21
|
*/
|
|
32
22
|
exports.METHOD_MAP = ({
|
|
33
23
|
//
|
|
34
|
-
// W3C WebDriver
|
|
24
|
+
// W3C WebDriver
|
|
35
25
|
// https://www.w3.org/TR/webdriver1/
|
|
36
26
|
// https://www.w3.org/TR/webdriver2/
|
|
37
27
|
//
|
|
@@ -42,38 +32,20 @@ exports.METHOD_MAP = ({
|
|
|
42
32
|
POST: {
|
|
43
33
|
command: 'createSession',
|
|
44
34
|
payloadParams: {
|
|
45
|
-
|
|
46
|
-
validate: (jsonObj) => !jsonObj.capabilities &&
|
|
47
|
-
!jsonObj.desiredCapabilities &&
|
|
48
|
-
'we require one of "desiredCapabilities" or "capabilities" object',
|
|
49
|
-
optional: ['desiredCapabilities', 'requiredCapabilities', 'capabilities'],
|
|
35
|
+
optional: ['capabilities', 'capabilities', 'capabilities'],
|
|
50
36
|
},
|
|
51
37
|
},
|
|
52
38
|
},
|
|
53
39
|
'/session/:sessionId': {
|
|
40
|
+
// TODO: Decide on the future of this route later
|
|
54
41
|
GET: { command: 'getSession', deprecated: true },
|
|
55
42
|
DELETE: { command: 'deleteSession' },
|
|
56
43
|
},
|
|
57
44
|
'/session/:sessionId/timeouts': {
|
|
58
|
-
GET: { command: 'getTimeouts' },
|
|
45
|
+
GET: { command: 'getTimeouts' },
|
|
59
46
|
POST: {
|
|
60
47
|
command: 'timeouts',
|
|
61
48
|
payloadParams: {
|
|
62
|
-
validate: (jsonObj, protocolName) => {
|
|
63
|
-
if (protocolName === constants_1.PROTOCOLS.W3C) {
|
|
64
|
-
if (!support_1.util.hasValue(jsonObj.script) &&
|
|
65
|
-
!support_1.util.hasValue(jsonObj.pageLoad) &&
|
|
66
|
-
!support_1.util.hasValue(jsonObj.implicit)) {
|
|
67
|
-
return 'W3C protocol expects any of script, pageLoad or implicit to be set';
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
else {
|
|
71
|
-
// TODO: Remove in Appium 3
|
|
72
|
-
if (!support_1.util.hasValue(jsonObj.type) || !support_1.util.hasValue(jsonObj.ms)) {
|
|
73
|
-
return 'MJSONWP protocol requires type and ms';
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
49
|
optional: ['type', 'ms', 'script', 'pageLoad', 'implicit'],
|
|
78
50
|
},
|
|
79
51
|
},
|
|
@@ -108,21 +80,7 @@ exports.METHOD_MAP = ({
|
|
|
108
80
|
POST: {
|
|
109
81
|
command: 'setWindow',
|
|
110
82
|
payloadParams: {
|
|
111
|
-
|
|
112
|
-
optional: ['name', 'handle'],
|
|
113
|
-
// Return both values to match W3C and JSONWP protocols
|
|
114
|
-
makeArgs: (jsonObj) => {
|
|
115
|
-
if (support_1.util.hasValue(jsonObj.handle) && !support_1.util.hasValue(jsonObj.name)) {
|
|
116
|
-
return [jsonObj.handle, jsonObj.handle];
|
|
117
|
-
}
|
|
118
|
-
if (support_1.util.hasValue(jsonObj.name) && !support_1.util.hasValue(jsonObj.handle)) {
|
|
119
|
-
return [jsonObj.name, jsonObj.name];
|
|
120
|
-
}
|
|
121
|
-
return [jsonObj.name, jsonObj.handle];
|
|
122
|
-
},
|
|
123
|
-
validate: (jsonObj) => !support_1.util.hasValue(jsonObj.name) &&
|
|
124
|
-
!support_1.util.hasValue(jsonObj.handle) &&
|
|
125
|
-
'we require one of "name" or "handle" to be set',
|
|
83
|
+
required: ['handle'],
|
|
126
84
|
},
|
|
127
85
|
},
|
|
128
86
|
DELETE: { command: 'closeWindow' },
|
|
@@ -167,8 +125,7 @@ exports.METHOD_MAP = ({
|
|
|
167
125
|
},
|
|
168
126
|
},
|
|
169
127
|
'/session/:sessionId/element/active': {
|
|
170
|
-
GET: { command: 'active' },
|
|
171
|
-
POST: { command: 'active', deprecated: true },
|
|
128
|
+
GET: { command: 'active' },
|
|
172
129
|
},
|
|
173
130
|
'/session/:sessionId/element/:elementId': {
|
|
174
131
|
GET: {},
|
|
@@ -195,17 +152,7 @@ exports.METHOD_MAP = ({
|
|
|
195
152
|
POST: {
|
|
196
153
|
command: 'setValue',
|
|
197
154
|
payloadParams: {
|
|
198
|
-
|
|
199
|
-
!support_1.util.hasValue(jsonObj.text) &&
|
|
200
|
-
'we require one of "text" or "value" params',
|
|
201
|
-
// TODO: Appium 3 will accept only 'value'.
|
|
202
|
-
optional: ['value', 'text'],
|
|
203
|
-
// override the default argument constructor because of the special
|
|
204
|
-
// logic here. Basically we want to accept either a value (old JSONWP)
|
|
205
|
-
// or a text (new W3C) parameter, but only send one of them to the
|
|
206
|
-
// command (not both). Prefer 'value' since it's more
|
|
207
|
-
// backward-compatible.
|
|
208
|
-
makeArgs: (jsonObj) => [jsonObj.value || jsonObj.text],
|
|
155
|
+
required: ['text'],
|
|
209
156
|
},
|
|
210
157
|
},
|
|
211
158
|
},
|
|
@@ -264,7 +211,9 @@ exports.METHOD_MAP = ({
|
|
|
264
211
|
GET: { command: 'getAlertText' },
|
|
265
212
|
POST: {
|
|
266
213
|
command: 'setAlertText',
|
|
267
|
-
payloadParams:
|
|
214
|
+
payloadParams: {
|
|
215
|
+
required: ['text'],
|
|
216
|
+
},
|
|
268
217
|
},
|
|
269
218
|
},
|
|
270
219
|
'/session/:sessionId/alert/accept': {
|
|
@@ -299,19 +248,23 @@ exports.METHOD_MAP = ({
|
|
|
299
248
|
// Appium specific
|
|
300
249
|
//
|
|
301
250
|
'/session/:sessionId/ime/available_engines': {
|
|
302
|
-
GET: { command: 'availableIMEEngines' },
|
|
251
|
+
GET: { command: 'availableIMEEngines', deprecated: true },
|
|
303
252
|
},
|
|
304
253
|
'/session/:sessionId/ime/active_engine': {
|
|
305
|
-
GET: { command: 'getActiveIMEEngine' },
|
|
254
|
+
GET: { command: 'getActiveIMEEngine', deprecated: true },
|
|
306
255
|
},
|
|
307
256
|
'/session/:sessionId/ime/activated': {
|
|
308
|
-
GET: { command: 'isIMEActivated' },
|
|
257
|
+
GET: { command: 'isIMEActivated', deprecated: true },
|
|
309
258
|
},
|
|
310
259
|
'/session/:sessionId/ime/deactivate': {
|
|
311
|
-
POST: { command: 'deactivateIMEEngine' },
|
|
260
|
+
POST: { command: 'deactivateIMEEngine', deprecated: true },
|
|
312
261
|
},
|
|
313
262
|
'/session/:sessionId/ime/activate': {
|
|
314
|
-
POST: {
|
|
263
|
+
POST: {
|
|
264
|
+
command: 'activateIMEEngine',
|
|
265
|
+
payloadParams: { required: ['engine'] },
|
|
266
|
+
deprecated: true,
|
|
267
|
+
},
|
|
315
268
|
},
|
|
316
269
|
'/session/:sessionId/rotation': {
|
|
317
270
|
GET: { command: 'getRotation' },
|
|
@@ -336,16 +289,18 @@ exports.METHOD_MAP = ({
|
|
|
336
289
|
GET: { command: 'getContexts' },
|
|
337
290
|
},
|
|
338
291
|
'/session/:sessionId/network_connection': {
|
|
339
|
-
GET: { command: 'getNetworkConnection' },
|
|
292
|
+
GET: { command: 'getNetworkConnection', deprecated: true },
|
|
340
293
|
POST: {
|
|
341
294
|
command: 'setNetworkConnection',
|
|
342
295
|
payloadParams: { unwrap: 'parameters', required: ['type'] },
|
|
296
|
+
deprecated: true,
|
|
343
297
|
},
|
|
344
298
|
},
|
|
345
299
|
'/session/:sessionId/receive_async_response': {
|
|
346
300
|
POST: {
|
|
347
301
|
command: 'receiveAsyncResponse',
|
|
348
302
|
payloadParams: { required: ['status', 'value'] },
|
|
303
|
+
deprecated: true,
|
|
349
304
|
},
|
|
350
305
|
},
|
|
351
306
|
'/appium/sessions': {
|
|
@@ -355,7 +310,7 @@ exports.METHOD_MAP = ({
|
|
|
355
310
|
GET: { command: 'getAppiumSessionCapabilities' }
|
|
356
311
|
},
|
|
357
312
|
'/session/:sessionId/appium/device/system_time': {
|
|
358
|
-
GET: { command: 'getDeviceTime'
|
|
313
|
+
GET: { command: 'getDeviceTime' },
|
|
359
314
|
POST: { command: 'getDeviceTime', payloadParams: { optional: ['format'] } },
|
|
360
315
|
},
|
|
361
316
|
// #region Applications Management
|
|
@@ -404,18 +359,11 @@ exports.METHOD_MAP = ({
|
|
|
404
359
|
},
|
|
405
360
|
},
|
|
406
361
|
'/session/:sessionId/appium/device/app_state': {
|
|
407
|
-
GET: {
|
|
408
|
-
command: 'queryAppState',
|
|
409
|
-
payloadParams: {
|
|
410
|
-
required: [['appId'], ['bundleId']],
|
|
411
|
-
},
|
|
412
|
-
},
|
|
413
362
|
POST: {
|
|
414
363
|
command: 'queryAppState',
|
|
415
364
|
payloadParams: {
|
|
416
365
|
required: [['appId'], ['bundleId']],
|
|
417
366
|
},
|
|
418
|
-
deprecated: true,
|
|
419
367
|
},
|
|
420
368
|
},
|
|
421
369
|
// #endregion
|
|
@@ -516,418 +464,6 @@ exports.METHOD_MAP = ({
|
|
|
516
464
|
},
|
|
517
465
|
},
|
|
518
466
|
// #endregion
|
|
519
|
-
//
|
|
520
|
-
// Endpoints deprecated entirely
|
|
521
|
-
//
|
|
522
|
-
// #region MJSONWP
|
|
523
|
-
'/sessions': {
|
|
524
|
-
GET: { command: 'getSessions', deprecated: true },
|
|
525
|
-
},
|
|
526
|
-
'/session/:sessionId/timeouts/async_script': {
|
|
527
|
-
POST: { command: 'asyncScriptTimeout', payloadParams: { required: ['ms'] }, deprecated: true },
|
|
528
|
-
},
|
|
529
|
-
'/session/:sessionId/timeouts/implicit_wait': {
|
|
530
|
-
POST: { command: 'implicitWait', payloadParams: { required: ['ms'] }, deprecated: true },
|
|
531
|
-
},
|
|
532
|
-
'/session/:sessionId/window_handle': {
|
|
533
|
-
GET: { command: 'getWindowHandle', deprecated: true },
|
|
534
|
-
},
|
|
535
|
-
// Only 'window/handles' exists in W3C WebDriver spec.
|
|
536
|
-
'/session/:sessionId/window/handle': {
|
|
537
|
-
GET: { command: 'getWindowHandle', deprecated: true },
|
|
538
|
-
},
|
|
539
|
-
'/session/:sessionId/window_handles': {
|
|
540
|
-
GET: { command: 'getWindowHandles', deprecated: true },
|
|
541
|
-
},
|
|
542
|
-
'/session/:sessionId/execute': {
|
|
543
|
-
POST: {
|
|
544
|
-
command: 'execute',
|
|
545
|
-
payloadParams: { required: ['script', 'args'] },
|
|
546
|
-
deprecated: true
|
|
547
|
-
},
|
|
548
|
-
},
|
|
549
|
-
'/session/:sessionId/execute_async': {
|
|
550
|
-
POST: {
|
|
551
|
-
command: 'executeAsync',
|
|
552
|
-
payloadParams: { required: ['script', 'args'] },
|
|
553
|
-
deprecated: true
|
|
554
|
-
},
|
|
555
|
-
},
|
|
556
|
-
'/session/:sessionId/window/:windowhandle/size': {
|
|
557
|
-
GET: { command: 'getWindowSize', deprecated: true },
|
|
558
|
-
},
|
|
559
|
-
'/session/:sessionId/window/:windowhandle/position': {
|
|
560
|
-
POST: { deprecated: true },
|
|
561
|
-
GET: { deprecated: true },
|
|
562
|
-
},
|
|
563
|
-
'/session/:sessionId/window/:windowhandle/maximize': {
|
|
564
|
-
POST: { command: 'maximizeWindow', deprecated: true },
|
|
565
|
-
},
|
|
566
|
-
'/session/:sessionId/element/:elementId/submit': {
|
|
567
|
-
POST: { command: 'submit', deprecated: true },
|
|
568
|
-
},
|
|
569
|
-
'/session/:sessionId/keys': {
|
|
570
|
-
POST: { command: 'keys', payloadParams: { required: ['value'] }, deprecated: true },
|
|
571
|
-
},
|
|
572
|
-
'/session/:sessionId/element/:elementId/equals/:otherId': {
|
|
573
|
-
GET: { command: 'equalsElement', deprecated: true },
|
|
574
|
-
},
|
|
575
|
-
'/session/:sessionId/element/:elementId/location': {
|
|
576
|
-
GET: { command: 'getLocation', deprecated: true },
|
|
577
|
-
},
|
|
578
|
-
'/session/:sessionId/element/:elementId/location_in_view': {
|
|
579
|
-
GET: { command: 'getLocationInView', deprecated: true },
|
|
580
|
-
},
|
|
581
|
-
'/session/:sessionId/element/:elementId/size': {
|
|
582
|
-
GET: { command: 'getSize', deprecated: true },
|
|
583
|
-
},
|
|
584
|
-
'/session/:sessionId/moveto': {
|
|
585
|
-
POST: {
|
|
586
|
-
command: 'moveTo',
|
|
587
|
-
payloadParams: { optional: ['element', 'xoffset', 'yoffset'] },
|
|
588
|
-
deprecated: true,
|
|
589
|
-
},
|
|
590
|
-
},
|
|
591
|
-
'/session/:sessionId/click': {
|
|
592
|
-
POST: { command: 'clickCurrent', payloadParams: { optional: ['button'] }, deprecated: true },
|
|
593
|
-
},
|
|
594
|
-
'/session/:sessionId/buttondown': {
|
|
595
|
-
POST: { command: 'buttonDown', payloadParams: { optional: ['button'] }, deprecated: true },
|
|
596
|
-
},
|
|
597
|
-
'/session/:sessionId/buttonup': {
|
|
598
|
-
POST: { command: 'buttonUp', payloadParams: { optional: ['button'] }, deprecated: true },
|
|
599
|
-
},
|
|
600
|
-
'/session/:sessionId/doubleclick': {
|
|
601
|
-
POST: { command: 'doubleClick', deprecated: true },
|
|
602
|
-
},
|
|
603
|
-
'/session/:sessionId/touch/click': {
|
|
604
|
-
POST: { command: 'click', payloadParams: { required: ['element'] }, deprecated: true },
|
|
605
|
-
},
|
|
606
|
-
'/session/:sessionId/touch/down': {
|
|
607
|
-
POST: { command: 'touchDown', payloadParams: { required: ['x', 'y'] }, deprecated: true },
|
|
608
|
-
},
|
|
609
|
-
'/session/:sessionId/touch/up': {
|
|
610
|
-
POST: { command: 'touchUp', payloadParams: { required: ['x', 'y'] }, deprecated: true },
|
|
611
|
-
},
|
|
612
|
-
'/session/:sessionId/touch/move': {
|
|
613
|
-
POST: { command: 'touchMove', payloadParams: { required: ['x', 'y'] }, deprecated: true },
|
|
614
|
-
},
|
|
615
|
-
'/session/:sessionId/touch/scroll': {
|
|
616
|
-
POST: { deprecated: true },
|
|
617
|
-
},
|
|
618
|
-
'/session/:sessionId/touch/doubleclick': {
|
|
619
|
-
POST: { deprecated: true },
|
|
620
|
-
},
|
|
621
|
-
'/session/:sessionId/touch/longclick': {
|
|
622
|
-
POST: {
|
|
623
|
-
command: 'touchLongClick',
|
|
624
|
-
payloadParams: { required: ['elements'] },
|
|
625
|
-
deprecated: true,
|
|
626
|
-
},
|
|
627
|
-
},
|
|
628
|
-
'/session/:sessionId/touch/flick': {
|
|
629
|
-
POST: {
|
|
630
|
-
command: 'flick',
|
|
631
|
-
payloadParams: {
|
|
632
|
-
optional: ['element', 'xspeed', 'yspeed', 'xoffset', 'yoffset', 'speed'],
|
|
633
|
-
},
|
|
634
|
-
deprecated: true,
|
|
635
|
-
},
|
|
636
|
-
},
|
|
637
|
-
'/session/:sessionId/local_storage': {
|
|
638
|
-
GET: { deprecated: true },
|
|
639
|
-
POST: { deprecated: true },
|
|
640
|
-
DELETE: { deprecated: true },
|
|
641
|
-
},
|
|
642
|
-
'/session/:sessionId/local_storage/key/:key': {
|
|
643
|
-
GET: { deprecated: true },
|
|
644
|
-
DELETE: { deprecated: true },
|
|
645
|
-
},
|
|
646
|
-
'/session/:sessionId/local_storage/size': {
|
|
647
|
-
GET: { deprecated: true },
|
|
648
|
-
},
|
|
649
|
-
'/session/:sessionId/session_storage': {
|
|
650
|
-
GET: { deprecated: true },
|
|
651
|
-
POST: { deprecated: true },
|
|
652
|
-
DELETE: { deprecated: true },
|
|
653
|
-
},
|
|
654
|
-
'/session/:sessionId/session_storage/key/:key': {
|
|
655
|
-
GET: { deprecated: true },
|
|
656
|
-
DELETE: { deprecated: true },
|
|
657
|
-
},
|
|
658
|
-
'/session/:sessionId/session_storage/size': {
|
|
659
|
-
GET: { deprecated: true },
|
|
660
|
-
},
|
|
661
|
-
'/session/:sessionId/application_cache/status': {
|
|
662
|
-
GET: { deprecated: true },
|
|
663
|
-
},
|
|
664
|
-
'/session/:sessionId/alert_text': {
|
|
665
|
-
GET: { command: 'getAlertText', deprecated: true },
|
|
666
|
-
POST: {
|
|
667
|
-
command: 'setAlertText',
|
|
668
|
-
payloadParams: SET_ALERT_TEXT_PAYLOAD_PARAMS,
|
|
669
|
-
deprecated: true
|
|
670
|
-
},
|
|
671
|
-
},
|
|
672
|
-
'/session/:sessionId/accept_alert': {
|
|
673
|
-
POST: { command: 'postAcceptAlert', deprecated: true },
|
|
674
|
-
},
|
|
675
|
-
'/session/:sessionId/dismiss_alert': {
|
|
676
|
-
POST: { command: 'postDismissAlert', deprecated: true },
|
|
677
|
-
},
|
|
678
|
-
// Pre-W3C endpoint for element screenshot
|
|
679
|
-
'/session/:sessionId/screenshot/:elementId': {
|
|
680
|
-
GET: { command: 'getElementScreenshot', deprecated: true },
|
|
681
|
-
},
|
|
682
|
-
// #endregion
|
|
683
|
-
// #region Appium specific
|
|
684
|
-
'/session/:sessionId/element/:elementId/pageIndex': {
|
|
685
|
-
GET: { command: 'getPageIndex', deprecated: true },
|
|
686
|
-
},
|
|
687
|
-
'/session/:sessionId/touch/perform': {
|
|
688
|
-
POST: {
|
|
689
|
-
command: 'performTouch',
|
|
690
|
-
payloadParams: { wrap: 'actions', required: ['actions'] },
|
|
691
|
-
deprecated: true,
|
|
692
|
-
},
|
|
693
|
-
},
|
|
694
|
-
'/session/:sessionId/touch/multi/perform': {
|
|
695
|
-
POST: {
|
|
696
|
-
command: 'performMultiAction',
|
|
697
|
-
payloadParams: { required: ['actions'], optional: ['elementId'] },
|
|
698
|
-
deprecated: true,
|
|
699
|
-
},
|
|
700
|
-
},
|
|
701
|
-
'/session/:sessionId/appium/device/shake': {
|
|
702
|
-
POST: { command: 'mobileShake', deprecated: true },
|
|
703
|
-
},
|
|
704
|
-
'/session/:sessionId/appium/device/lock': {
|
|
705
|
-
POST: { command: 'lock', payloadParams: { optional: ['seconds'] }, deprecated: true },
|
|
706
|
-
},
|
|
707
|
-
'/session/:sessionId/appium/device/unlock': {
|
|
708
|
-
POST: { command: 'unlock', deprecated: true },
|
|
709
|
-
},
|
|
710
|
-
'/session/:sessionId/appium/device/is_locked': {
|
|
711
|
-
POST: { command: 'isLocked', deprecated: true },
|
|
712
|
-
},
|
|
713
|
-
'/session/:sessionId/appium/start_recording_screen': {
|
|
714
|
-
POST: {
|
|
715
|
-
command: 'startRecordingScreen',
|
|
716
|
-
payloadParams: { optional: ['options'] },
|
|
717
|
-
deprecated: true,
|
|
718
|
-
},
|
|
719
|
-
},
|
|
720
|
-
'/session/:sessionId/appium/stop_recording_screen': {
|
|
721
|
-
POST: {
|
|
722
|
-
command: 'stopRecordingScreen',
|
|
723
|
-
payloadParams: { optional: ['options'] },
|
|
724
|
-
deprecated: true,
|
|
725
|
-
},
|
|
726
|
-
},
|
|
727
|
-
'/session/:sessionId/appium/performanceData/types': {
|
|
728
|
-
POST: { command: 'getPerformanceDataTypes', deprecated: true },
|
|
729
|
-
},
|
|
730
|
-
'/session/:sessionId/appium/getPerformanceData': {
|
|
731
|
-
POST: {
|
|
732
|
-
command: 'getPerformanceData',
|
|
733
|
-
payloadParams: {
|
|
734
|
-
required: ['packageName', 'dataType'],
|
|
735
|
-
optional: ['dataReadTimeout'],
|
|
736
|
-
},
|
|
737
|
-
deprecated: true,
|
|
738
|
-
},
|
|
739
|
-
},
|
|
740
|
-
'/session/:sessionId/appium/device/press_keycode': {
|
|
741
|
-
POST: {
|
|
742
|
-
command: 'pressKeyCode',
|
|
743
|
-
payloadParams: { required: ['keycode'], optional: ['metastate', 'flags'] },
|
|
744
|
-
deprecated: true,
|
|
745
|
-
},
|
|
746
|
-
},
|
|
747
|
-
'/session/:sessionId/appium/device/long_press_keycode': {
|
|
748
|
-
POST: {
|
|
749
|
-
command: 'longPressKeyCode',
|
|
750
|
-
payloadParams: { required: ['keycode'], optional: ['metastate', 'flags'] },
|
|
751
|
-
deprecated: true,
|
|
752
|
-
},
|
|
753
|
-
},
|
|
754
|
-
'/session/:sessionId/appium/device/finger_print': {
|
|
755
|
-
POST: {
|
|
756
|
-
command: 'fingerprint',
|
|
757
|
-
payloadParams: { required: ['fingerprintId'] },
|
|
758
|
-
deprecated: true,
|
|
759
|
-
},
|
|
760
|
-
},
|
|
761
|
-
'/session/:sessionId/appium/device/send_sms': {
|
|
762
|
-
POST: {
|
|
763
|
-
command: 'sendSMS',
|
|
764
|
-
payloadParams: { required: ['phoneNumber', 'message'] },
|
|
765
|
-
deprecated: true,
|
|
766
|
-
},
|
|
767
|
-
},
|
|
768
|
-
'/session/:sessionId/appium/device/gsm_call': {
|
|
769
|
-
POST: {
|
|
770
|
-
command: 'gsmCall',
|
|
771
|
-
payloadParams: { required: ['phoneNumber', 'action'] },
|
|
772
|
-
deprecated: true,
|
|
773
|
-
},
|
|
774
|
-
},
|
|
775
|
-
'/session/:sessionId/appium/device/gsm_signal': {
|
|
776
|
-
POST: {
|
|
777
|
-
command: 'gsmSignal',
|
|
778
|
-
payloadParams: { required: ['signalStrength'] },
|
|
779
|
-
deprecated: true,
|
|
780
|
-
},
|
|
781
|
-
},
|
|
782
|
-
'/session/:sessionId/appium/device/gsm_voice': {
|
|
783
|
-
POST: { command: 'gsmVoice', payloadParams: { required: ['state'] }, deprecated: true },
|
|
784
|
-
},
|
|
785
|
-
'/session/:sessionId/appium/device/power_capacity': {
|
|
786
|
-
POST: { command: 'powerCapacity', payloadParams: { required: ['percent'] }, deprecated: true },
|
|
787
|
-
},
|
|
788
|
-
'/session/:sessionId/appium/device/power_ac': {
|
|
789
|
-
POST: { command: 'powerAC', payloadParams: { required: ['state'] }, deprecated: true },
|
|
790
|
-
},
|
|
791
|
-
'/session/:sessionId/appium/device/network_speed': {
|
|
792
|
-
POST: { command: 'networkSpeed', payloadParams: { required: ['netspeed'] }, deprecated: true },
|
|
793
|
-
},
|
|
794
|
-
'/session/:sessionId/appium/device/keyevent': {
|
|
795
|
-
POST: {
|
|
796
|
-
command: 'keyevent',
|
|
797
|
-
payloadParams: { required: ['keycode'], optional: ['metastate'] },
|
|
798
|
-
deprecated: true,
|
|
799
|
-
},
|
|
800
|
-
},
|
|
801
|
-
'/session/:sessionId/appium/device/current_activity': {
|
|
802
|
-
GET: { command: 'getCurrentActivity', deprecated: true },
|
|
803
|
-
},
|
|
804
|
-
'/session/:sessionId/appium/device/current_package': {
|
|
805
|
-
GET: { command: 'getCurrentPackage', deprecated: true },
|
|
806
|
-
},
|
|
807
|
-
'/session/:sessionId/appium/device/toggle_airplane_mode': {
|
|
808
|
-
POST: { command: 'toggleFlightMode', deprecated: true },
|
|
809
|
-
},
|
|
810
|
-
'/session/:sessionId/appium/device/toggle_data': {
|
|
811
|
-
POST: { command: 'toggleData', deprecated: true },
|
|
812
|
-
},
|
|
813
|
-
'/session/:sessionId/appium/device/toggle_wifi': {
|
|
814
|
-
POST: { command: 'toggleWiFi', deprecated: true },
|
|
815
|
-
},
|
|
816
|
-
'/session/:sessionId/appium/device/toggle_location_services': {
|
|
817
|
-
POST: { command: 'toggleLocationServices', deprecated: true },
|
|
818
|
-
},
|
|
819
|
-
'/session/:sessionId/appium/device/open_notifications': {
|
|
820
|
-
POST: { command: 'openNotifications', deprecated: true },
|
|
821
|
-
},
|
|
822
|
-
'/session/:sessionId/appium/device/start_activity': {
|
|
823
|
-
POST: {
|
|
824
|
-
command: 'startActivity',
|
|
825
|
-
payloadParams: {
|
|
826
|
-
required: ['appPackage', 'appActivity'],
|
|
827
|
-
optional: [
|
|
828
|
-
'appWaitPackage',
|
|
829
|
-
'appWaitActivity',
|
|
830
|
-
'intentAction',
|
|
831
|
-
'intentCategory',
|
|
832
|
-
'intentFlags',
|
|
833
|
-
'optionalIntentArguments',
|
|
834
|
-
'dontStopAppOnReset',
|
|
835
|
-
],
|
|
836
|
-
},
|
|
837
|
-
deprecated: true,
|
|
838
|
-
},
|
|
839
|
-
},
|
|
840
|
-
'/session/:sessionId/appium/device/system_bars': {
|
|
841
|
-
GET: { command: 'getSystemBars', deprecated: true },
|
|
842
|
-
},
|
|
843
|
-
'/session/:sessionId/appium/device/display_density': {
|
|
844
|
-
GET: { command: 'getDisplayDensity', deprecated: true },
|
|
845
|
-
},
|
|
846
|
-
'/session/:sessionId/appium/simulator/touch_id': {
|
|
847
|
-
POST: { command: 'touchId', payloadParams: { required: ['match'] }, deprecated: true },
|
|
848
|
-
},
|
|
849
|
-
'/session/:sessionId/appium/simulator/toggle_touch_id_enrollment': {
|
|
850
|
-
POST: {
|
|
851
|
-
command: 'toggleEnrollTouchId',
|
|
852
|
-
payloadParams: { optional: ['enabled'] },
|
|
853
|
-
deprecated: true,
|
|
854
|
-
},
|
|
855
|
-
},
|
|
856
|
-
'/session/:sessionId/appium/app/launch': {
|
|
857
|
-
POST: { command: 'launchApp', deprecated: true },
|
|
858
|
-
},
|
|
859
|
-
'/session/:sessionId/appium/app/close': {
|
|
860
|
-
POST: { command: 'closeApp', deprecated: true },
|
|
861
|
-
},
|
|
862
|
-
'/session/:sessionId/appium/app/reset': {
|
|
863
|
-
POST: { command: 'reset', deprecated: true },
|
|
864
|
-
},
|
|
865
|
-
'/session/:sessionId/appium/app/background': {
|
|
866
|
-
POST: { command: 'background', payloadParams: { required: ['seconds'] }, deprecated: true },
|
|
867
|
-
},
|
|
868
|
-
'/session/:sessionId/appium/app/end_test_coverage': {
|
|
869
|
-
POST: {
|
|
870
|
-
command: 'endCoverage',
|
|
871
|
-
payloadParams: { required: ['intent', 'path'] },
|
|
872
|
-
deprecated: true,
|
|
873
|
-
},
|
|
874
|
-
},
|
|
875
|
-
'/session/:sessionId/appium/app/strings': {
|
|
876
|
-
POST: {
|
|
877
|
-
command: 'getStrings',
|
|
878
|
-
payloadParams: { optional: ['language', 'stringFile'] },
|
|
879
|
-
deprecated: true,
|
|
880
|
-
},
|
|
881
|
-
},
|
|
882
|
-
'/session/:sessionId/appium/element/:elementId/value': {
|
|
883
|
-
POST: {
|
|
884
|
-
command: 'setValueImmediate',
|
|
885
|
-
payloadParams: { required: ['text'] },
|
|
886
|
-
deprecated: true,
|
|
887
|
-
},
|
|
888
|
-
},
|
|
889
|
-
'/session/:sessionId/appium/element/:elementId/replace_value': {
|
|
890
|
-
POST: {
|
|
891
|
-
command: 'replaceValue',
|
|
892
|
-
payloadParams: { required: ['text'] },
|
|
893
|
-
deprecated: true,
|
|
894
|
-
},
|
|
895
|
-
},
|
|
896
|
-
'/session/:sessionId/appium/receive_async_response': {
|
|
897
|
-
POST: {
|
|
898
|
-
command: 'receiveAsyncResponse',
|
|
899
|
-
payloadParams: { required: ['response'] },
|
|
900
|
-
deprecated: true,
|
|
901
|
-
},
|
|
902
|
-
},
|
|
903
|
-
'/session/:sessionId/appium/device/set_clipboard': {
|
|
904
|
-
POST: {
|
|
905
|
-
command: 'setClipboard',
|
|
906
|
-
payloadParams: {
|
|
907
|
-
required: ['content'],
|
|
908
|
-
optional: ['contentType', 'label'],
|
|
909
|
-
},
|
|
910
|
-
deprecated: true,
|
|
911
|
-
},
|
|
912
|
-
},
|
|
913
|
-
'/session/:sessionId/appium/device/get_clipboard': {
|
|
914
|
-
POST: {
|
|
915
|
-
command: 'getClipboard',
|
|
916
|
-
payloadParams: {
|
|
917
|
-
optional: ['contentType'],
|
|
918
|
-
},
|
|
919
|
-
deprecated: true,
|
|
920
|
-
},
|
|
921
|
-
},
|
|
922
|
-
// #endregion
|
|
923
|
-
// #region JSONWP
|
|
924
|
-
'/session/:sessionId/log': {
|
|
925
|
-
POST: { command: 'getLog', payloadParams: { required: ['type'] }, deprecated: true },
|
|
926
|
-
},
|
|
927
|
-
'/session/:sessionId/log/types': {
|
|
928
|
-
GET: { command: 'getLogTypes', deprecated: true },
|
|
929
|
-
},
|
|
930
|
-
// #endregion
|
|
931
467
|
});
|
|
932
468
|
// driver command names
|
|
933
469
|
exports.ALL_COMMANDS = lodash_1.default.flatMap(lodash_1.default.values(exports.METHOD_MAP).map(lodash_1.default.values))
|
|
@@ -992,5 +528,5 @@ function toCommandNameCacheKey(endpoint, method) {
|
|
|
992
528
|
return `${endpoint}:${method ?? ''}`;
|
|
993
529
|
}
|
|
994
530
|
// driver commands that do not require a session to already exist
|
|
995
|
-
exports.NO_SESSION_ID_COMMANDS = ['createSession', 'getStatus', '
|
|
531
|
+
exports.NO_SESSION_ID_COMMANDS = ['createSession', 'getStatus', 'getAppiumSessions'];
|
|
996
532
|
//# sourceMappingURL=routes.js.map
|