@appium/base-driver 10.0.1 → 10.1.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.
@@ -1 +1 @@
1
- {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../lib/protocol/routes.js"],"names":[],"mappings":"AA+dA;;;;;;GAMG;AACH,6CALW,MAAM,WACN,OAAO,eAAe,EAAE,UAAU,aAClC,MAAM,GACJ,MAAM,GAAC,SAAS,CA8C5B;AAxgBD;;;;;GAKG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwcG;AAGH,iCAEyB;AAkEzB,8CAA0F"}
1
+ {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../lib/protocol/routes.js"],"names":[],"mappings":"AA+jBA;;;;;;GAMG;AACH,6CALW,MAAM,WACN,OAAO,eAAe,EAAE,UAAU,aAClC,MAAM,GACJ,MAAM,GAAC,SAAS,CA8C5B;AAxmBD;;;;;GAKG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwiBG;AAGH,iCAEyB;AAkEzB,8CAA0F"}
@@ -20,14 +20,8 @@ const COMMAND_NAMES_CACHE = new lru_cache_1.LRUCache({
20
20
  * @satisfies {import('@appium/types').MethodMap<import('../basedriver/driver').BaseDriver>}
21
21
  */
22
22
  exports.METHOD_MAP = ({
23
- //
24
- // W3C WebDriver
25
- // https://www.w3.org/TR/webdriver1/
23
+ // #region W3C WebDriver
26
24
  // https://www.w3.org/TR/webdriver2/
27
- //
28
- '/status': {
29
- GET: { command: 'getStatus' },
30
- },
31
25
  '/session': {
32
26
  POST: {
33
27
  command: 'createSession',
@@ -37,10 +31,13 @@ exports.METHOD_MAP = ({
37
31
  },
38
32
  },
39
33
  '/session/:sessionId': {
40
- // TODO: Decide on the future of this route later
34
+ // TODO: JSONWP route, remove in the future
41
35
  GET: { command: 'getSession', deprecated: true },
42
36
  DELETE: { command: 'deleteSession' },
43
37
  },
38
+ '/status': {
39
+ GET: { command: 'getStatus' },
40
+ },
44
41
  '/session/:sessionId/timeouts': {
45
42
  GET: { command: 'getTimeouts' },
46
43
  POST: {
@@ -50,9 +47,6 @@ exports.METHOD_MAP = ({
50
47
  },
51
48
  },
52
49
  },
53
- '/session/:sessionId/window/handles': {
54
- GET: { command: 'getWindowHandles' },
55
- },
56
50
  '/session/:sessionId/url': {
57
51
  GET: { command: 'getUrl' },
58
52
  POST: { command: 'setUrl', payloadParams: { required: ['url'] } },
@@ -66,14 +60,8 @@ exports.METHOD_MAP = ({
66
60
  '/session/:sessionId/refresh': {
67
61
  POST: { command: 'refresh' },
68
62
  },
69
- '/session/:sessionId/screenshot': {
70
- GET: { command: 'getScreenshot' },
71
- },
72
- '/session/:sessionId/frame': {
73
- POST: { command: 'setFrame', payloadParams: { required: ['id'] } },
74
- },
75
- '/session/:sessionId/frame/parent': {
76
- POST: { command: 'switchToParentFrame' },
63
+ '/session/:sessionId/title': {
64
+ GET: { command: 'title' },
77
65
  },
78
66
  '/session/:sessionId/window': {
79
67
  GET: { command: 'getWindowHandle' },
@@ -85,6 +73,25 @@ exports.METHOD_MAP = ({
85
73
  },
86
74
  DELETE: { command: 'closeWindow' },
87
75
  },
76
+ '/session/:sessionId/window/handles': {
77
+ GET: { command: 'getWindowHandles' },
78
+ },
79
+ '/session/:sessionId/window/new': {
80
+ POST: { command: 'createNewWindow', payloadParams: { optional: ['type'] } },
81
+ },
82
+ '/session/:sessionId/frame': {
83
+ POST: { command: 'setFrame', payloadParams: { required: ['id'] } },
84
+ },
85
+ '/session/:sessionId/frame/parent': {
86
+ POST: { command: 'switchToParentFrame' },
87
+ },
88
+ '/session/:sessionId/window/rect': {
89
+ GET: { command: 'getWindowRect' },
90
+ POST: {
91
+ command: 'setWindowRect',
92
+ payloadParams: { optional: ['x', 'y', 'width', 'height'] },
93
+ },
94
+ },
88
95
  '/session/:sessionId/window/maximize': {
89
96
  POST: { command: 'maximizeWindow' },
90
97
  },
@@ -94,23 +101,11 @@ exports.METHOD_MAP = ({
94
101
  '/session/:sessionId/window/fullscreen': {
95
102
  POST: { command: 'fullScreenWindow' },
96
103
  },
97
- '/session/:sessionId/window/new': {
98
- POST: { command: 'createNewWindow', payloadParams: { optional: ['type'] } },
99
- },
100
- '/session/:sessionId/cookie': {
101
- GET: { command: 'getCookies' },
102
- POST: { command: 'setCookie', payloadParams: { required: ['cookie'] } },
103
- DELETE: { command: 'deleteCookies' },
104
- },
105
- '/session/:sessionId/cookie/:name': {
106
- GET: { command: 'getCookie' },
107
- DELETE: { command: 'deleteCookie' },
108
- },
109
- '/session/:sessionId/source': {
110
- GET: { command: 'getPageSource' },
104
+ '/session/:sessionId/element/active': {
105
+ GET: { command: 'active' },
111
106
  },
112
- '/session/:sessionId/title': {
113
- GET: { command: 'title' },
107
+ '/session/:sessionId/element/:elementId/shadow': {
108
+ GET: { command: 'elementShadowRoot' },
114
109
  },
115
110
  '/session/:sessionId/element': {
116
111
  POST: {
@@ -124,12 +119,6 @@ exports.METHOD_MAP = ({
124
119
  payloadParams: { required: ['using', 'value'] },
125
120
  },
126
121
  },
127
- '/session/:sessionId/element/active': {
128
- GET: { command: 'active' },
129
- },
130
- '/session/:sessionId/element/:elementId': {
131
- GET: {},
132
- },
133
122
  '/session/:sessionId/element/:elementId/element': {
134
123
  POST: {
135
124
  command: 'findElementFromElement',
@@ -142,58 +131,44 @@ exports.METHOD_MAP = ({
142
131
  payloadParams: { required: ['using', 'value'] },
143
132
  },
144
133
  },
145
- '/session/:sessionId/element/:elementId/click': {
146
- POST: { command: 'click' },
147
- },
148
- '/session/:sessionId/element/:elementId/text': {
149
- GET: { command: 'getText' },
150
- },
151
- '/session/:sessionId/element/:elementId/value': {
134
+ '/session/:sessionId/shadow/:shadowId/element': {
152
135
  POST: {
153
- command: 'setValue',
154
- payloadParams: {
155
- required: ['text'],
156
- },
136
+ command: 'findElementFromShadowRoot',
137
+ payloadParams: { required: ['using', 'value'] },
157
138
  },
158
139
  },
159
- '/session/:sessionId/element/:elementId/name': {
160
- GET: { command: 'getName' },
161
- },
162
- '/session/:sessionId/element/:elementId/clear': {
163
- POST: { command: 'clear' },
140
+ '/session/:sessionId/shadow/:shadowId/elements': {
141
+ POST: {
142
+ command: 'findElementsFromShadowRoot',
143
+ payloadParams: { required: ['using', 'value'] },
144
+ },
164
145
  },
165
146
  '/session/:sessionId/element/:elementId/selected': {
166
147
  GET: { command: 'elementSelected' },
167
148
  },
168
- '/session/:sessionId/element/:elementId/enabled': {
169
- GET: { command: 'elementEnabled' },
149
+ '/session/:sessionId/element/:elementId/displayed': {
150
+ GET: { command: 'elementDisplayed' },
170
151
  },
171
152
  '/session/:sessionId/element/:elementId/attribute/:name': {
172
153
  GET: { command: 'getAttribute' },
173
154
  },
174
- '/session/:sessionId/element/:elementId/displayed': {
175
- GET: { command: 'elementDisplayed' },
155
+ '/session/:sessionId/element/:elementId/property/:name': {
156
+ GET: { command: 'getProperty' },
176
157
  },
177
- '/session/:sessionId/element/:elementId/shadow': {
178
- GET: { command: 'elementShadowRoot' },
158
+ '/session/:sessionId/element/:elementId/css/:propertyName': {
159
+ GET: { command: 'getCssProperty' },
179
160
  },
180
- '/session/:sessionId/shadow/:shadowId/element': {
181
- POST: {
182
- command: 'findElementFromShadowRoot',
183
- payloadParams: { required: ['using', 'value'] },
184
- },
161
+ '/session/:sessionId/element/:elementId/text': {
162
+ GET: { command: 'getText' },
185
163
  },
186
- '/session/:sessionId/shadow/:shadowId/elements': {
187
- POST: {
188
- command: 'findElementsFromShadowRoot',
189
- payloadParams: { required: ['using', 'value'] },
190
- },
164
+ '/session/:sessionId/element/:elementId/name': {
165
+ GET: { command: 'getName' },
191
166
  },
192
- '/session/:sessionId/element/:elementId/css/:propertyName': {
193
- GET: { command: 'getCssProperty' },
167
+ '/session/:sessionId/element/:elementId/rect': {
168
+ GET: { command: 'getElementRect' },
194
169
  },
195
- '/session/:sessionId/element/:elementId/property/:name': {
196
- GET: { command: 'getProperty' },
170
+ '/session/:sessionId/element/:elementId/enabled': {
171
+ GET: { command: 'elementEnabled' },
197
172
  },
198
173
  '/session/:sessionId/element/:elementId/computedrole': {
199
174
  GET: { command: 'getComputedRole' },
@@ -201,27 +176,22 @@ exports.METHOD_MAP = ({
201
176
  '/session/:sessionId/element/:elementId/computedlabel': {
202
177
  GET: { command: 'getComputedLabel' },
203
178
  },
204
- '/session/:sessionId/actions': {
205
- POST: { command: 'performActions', payloadParams: { required: ['actions'] } },
206
- DELETE: { command: 'releaseActions' },
179
+ '/session/:sessionId/element/:elementId/click': {
180
+ POST: { command: 'click' },
207
181
  },
208
- '/session/:sessionId/alert/text': {
209
- GET: { command: 'getAlertText' },
182
+ '/session/:sessionId/element/:elementId/clear': {
183
+ POST: { command: 'clear' },
184
+ },
185
+ '/session/:sessionId/element/:elementId/value': {
210
186
  POST: {
211
- command: 'setAlertText',
187
+ command: 'setValue',
212
188
  payloadParams: {
213
189
  required: ['text'],
214
190
  },
215
191
  },
216
192
  },
217
- '/session/:sessionId/alert/accept': {
218
- POST: { command: 'postAcceptAlert' },
219
- },
220
- '/session/:sessionId/alert/dismiss': {
221
- POST: { command: 'postDismissAlert' },
222
- },
223
- '/session/:sessionId/element/:elementId/rect': {
224
- GET: { command: 'getElementRect' },
193
+ '/session/:sessionId/source': {
194
+ GET: { command: 'getPageSource' },
225
195
  },
226
196
  '/session/:sessionId/execute/sync': {
227
197
  POST: { command: 'execute', payloadParams: { required: ['script', 'args'] } },
@@ -232,19 +202,59 @@ exports.METHOD_MAP = ({
232
202
  payloadParams: { required: ['script', 'args'] },
233
203
  },
234
204
  },
205
+ '/session/:sessionId/cookie': {
206
+ GET: { command: 'getCookies' },
207
+ POST: { command: 'setCookie', payloadParams: { required: ['cookie'] } },
208
+ DELETE: { command: 'deleteCookies' },
209
+ },
210
+ '/session/:sessionId/cookie/:name': {
211
+ GET: { command: 'getCookie' },
212
+ DELETE: { command: 'deleteCookie' },
213
+ },
214
+ '/session/:sessionId/actions': {
215
+ POST: { command: 'performActions', payloadParams: { required: ['actions'] } },
216
+ DELETE: { command: 'releaseActions' },
217
+ },
218
+ '/session/:sessionId/alert/dismiss': {
219
+ POST: { command: 'postDismissAlert' },
220
+ },
221
+ '/session/:sessionId/alert/accept': {
222
+ POST: { command: 'postAcceptAlert' },
223
+ },
224
+ '/session/:sessionId/alert/text': {
225
+ GET: { command: 'getAlertText' },
226
+ POST: {
227
+ command: 'setAlertText',
228
+ payloadParams: {
229
+ required: ['text'],
230
+ },
231
+ },
232
+ },
233
+ '/session/:sessionId/screenshot': {
234
+ GET: { command: 'getScreenshot' },
235
+ },
235
236
  '/session/:sessionId/element/:elementId/screenshot': {
236
237
  GET: { command: 'getElementScreenshot' },
237
238
  },
238
- '/session/:sessionId/window/rect': {
239
- GET: { command: 'getWindowRect' },
239
+ '/session/:sessionId/print': {
240
240
  POST: {
241
- command: 'setWindowRect',
242
- payloadParams: { optional: ['x', 'y', 'width', 'height'] },
243
- },
241
+ command: 'printPage',
242
+ payloadParams: {
243
+ optional: [
244
+ 'orientation',
245
+ 'scale',
246
+ 'background',
247
+ 'page',
248
+ 'margin',
249
+ 'shrinkToFit',
250
+ 'pageRanges',
251
+ ],
252
+ }
253
+ }
244
254
  },
245
- //
246
- // Appium specific
247
- //
255
+ // #endregion
256
+ // #region JSONWP
257
+ // https://www.selenium.dev/documentation/legacy/json_wire_protocol/
248
258
  '/session/:sessionId/ime/available_engines': {
249
259
  GET: { command: 'availableIMEEngines', deprecated: true },
250
260
  },
@@ -264,9 +274,12 @@ exports.METHOD_MAP = ({
264
274
  deprecated: true,
265
275
  },
266
276
  },
267
- '/session/:sessionId/rotation': {
268
- GET: { command: 'getRotation' },
269
- POST: { command: 'setRotation', payloadParams: { required: ['x', 'y', 'z'] } },
277
+ '/session/:sessionId/orientation': {
278
+ GET: { command: 'getOrientation' },
279
+ POST: {
280
+ command: 'setOrientation',
281
+ payloadParams: { required: ['orientation'] }
282
+ },
270
283
  },
271
284
  '/session/:sessionId/location': {
272
285
  GET: {
@@ -279,12 +292,12 @@ exports.METHOD_MAP = ({
279
292
  deprecated: true,
280
293
  },
281
294
  },
282
- '/session/:sessionId/orientation': {
283
- GET: { command: 'getOrientation' },
284
- POST: {
285
- command: 'setOrientation',
286
- payloadParams: { required: ['orientation'] }
287
- },
295
+ // #endregion
296
+ // #region MJSONWP
297
+ // https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md
298
+ '/session/:sessionId/rotation': {
299
+ GET: { command: 'getRotation' },
300
+ POST: { command: 'setRotation', payloadParams: { required: ['x', 'y', 'z'] } },
288
301
  },
289
302
  '/session/:sessionId/context': {
290
303
  GET: { command: 'getCurrentContext' },
@@ -301,77 +314,89 @@ exports.METHOD_MAP = ({
301
314
  deprecated: true,
302
315
  },
303
316
  },
304
- '/session/:sessionId/receive_async_response': {
305
- POST: {
306
- command: 'receiveAsyncResponse',
307
- payloadParams: { required: ['status', 'value'] },
308
- deprecated: true,
309
- },
310
- },
317
+ // #endregion
318
+ // #region Appium
311
319
  '/appium/sessions': {
312
320
  GET: { command: 'getAppiumSessions' },
313
321
  },
314
322
  '/session/:sessionId/appium/capabilities': {
315
323
  GET: { command: 'getAppiumSessionCapabilities' }
316
324
  },
325
+ '/session/:sessionId/appium/settings': {
326
+ POST: { command: 'updateSettings', payloadParams: { required: ['settings'] } },
327
+ GET: { command: 'getSettings' },
328
+ },
329
+ '/session/:sessionId/appium/commands': {
330
+ GET: { command: 'listCommands' },
331
+ },
332
+ '/session/:sessionId/appium/extensions': {
333
+ GET: { command: 'listExtensions' },
334
+ },
335
+ '/session/:sessionId/appium/events': {
336
+ POST: { command: 'getLogEvents', payloadParams: { optional: ['type'] } },
337
+ },
338
+ '/session/:sessionId/appium/log_event': {
339
+ POST: {
340
+ command: 'logCustomEvent',
341
+ payloadParams: { required: ['vendor', 'event'] },
342
+ },
343
+ },
317
344
  '/session/:sessionId/appium/device/system_time': {
318
345
  GET: { command: 'getDeviceTime' },
319
346
  POST: { command: 'getDeviceTime', payloadParams: { optional: ['format'] } },
320
347
  },
321
- // #region Applications Management
322
- '/session/:sessionId/appium/device/install_app': {
348
+ '/session/:sessionId/appium/device/activate_app': {
323
349
  POST: {
324
- command: 'installApp',
350
+ command: 'activateApp',
325
351
  payloadParams: {
326
- required: ['appPath'],
352
+ required: [['appId'], ['bundleId']],
327
353
  optional: ['options'],
328
354
  },
329
355
  },
330
356
  },
331
- '/session/:sessionId/appium/device/activate_app': {
357
+ '/session/:sessionId/appium/device/terminate_app': {
332
358
  POST: {
333
- command: 'activateApp',
359
+ command: 'terminateApp',
334
360
  payloadParams: {
335
361
  required: [['appId'], ['bundleId']],
336
362
  optional: ['options'],
337
363
  },
338
364
  },
339
365
  },
340
- '/session/:sessionId/appium/device/remove_app': {
366
+ '/session/:sessionId/appium/device/app_state': {
341
367
  POST: {
342
- command: 'removeApp',
368
+ command: 'queryAppState',
343
369
  payloadParams: {
344
370
  required: [['appId'], ['bundleId']],
345
- optional: ['options'],
346
371
  },
347
372
  },
348
373
  },
349
- '/session/:sessionId/appium/device/terminate_app': {
374
+ '/session/:sessionId/appium/device/install_app': {
350
375
  POST: {
351
- command: 'terminateApp',
376
+ command: 'installApp',
352
377
  payloadParams: {
353
- required: [['appId'], ['bundleId']],
378
+ required: ['appPath'],
354
379
  optional: ['options'],
355
380
  },
356
381
  },
357
382
  },
358
- '/session/:sessionId/appium/device/app_installed': {
383
+ '/session/:sessionId/appium/device/remove_app': {
359
384
  POST: {
360
- command: 'isAppInstalled',
385
+ command: 'removeApp',
361
386
  payloadParams: {
362
387
  required: [['appId'], ['bundleId']],
388
+ optional: ['options'],
363
389
  },
364
390
  },
365
391
  },
366
- '/session/:sessionId/appium/device/app_state': {
392
+ '/session/:sessionId/appium/device/app_installed': {
367
393
  POST: {
368
- command: 'queryAppState',
394
+ command: 'isAppInstalled',
369
395
  payloadParams: {
370
396
  required: [['appId'], ['bundleId']],
371
397
  },
372
398
  },
373
399
  },
374
- // #endregion
375
400
  '/session/:sessionId/appium/device/hide_keyboard': {
376
401
  POST: {
377
402
  command: 'hideKeyboard',
@@ -390,45 +415,73 @@ exports.METHOD_MAP = ({
390
415
  '/session/:sessionId/appium/device/pull_folder': {
391
416
  POST: { command: 'pullFolder', payloadParams: { required: ['path'] } },
392
417
  },
393
- '/session/:sessionId/appium/settings': {
394
- POST: { command: 'updateSettings', payloadParams: { required: ['settings'] } },
395
- GET: { command: 'getSettings' },
396
- },
397
- '/session/:sessionId/appium/events': {
398
- POST: { command: 'getLogEvents', payloadParams: { optional: ['type'] } },
399
- },
400
- '/session/:sessionId/appium/log_event': {
418
+ // #endregion
419
+ // #region Unknown
420
+ '/session/:sessionId/receive_async_response': {
401
421
  POST: {
402
- command: 'logCustomEvent',
403
- payloadParams: { required: ['vendor', 'event'] },
422
+ command: 'receiveAsyncResponse',
423
+ payloadParams: { required: ['status', 'value'] },
424
+ deprecated: true,
404
425
  },
405
426
  },
406
- // #region Inspector
407
- '/session/:sessionId/appium/commands': {
408
- GET: { command: 'listCommands' },
409
- },
410
- '/session/:sessionId/appium/extensions': {
411
- GET: { command: 'listExtensions' },
427
+ '/session/:sessionId/element/:elementId': {
428
+ GET: {},
412
429
  },
413
430
  // #endregion
414
- //
415
- // 3rd party vendor/protocol support
416
- //
417
- // #region Selenium/Chromium browsers
431
+ // #region Other Protocols
432
+ // Selenium/Chromium browsers
418
433
  '/session/:sessionId/se/log': {
419
434
  POST: { command: 'getLog', payloadParams: { required: ['type'] } },
420
435
  },
421
436
  '/session/:sessionId/se/log/types': {
422
437
  GET: { command: 'getLogTypes' },
423
438
  },
424
- // #endregion
425
- // #region chromium devtools
439
+ // Chromium devtools
426
440
  // https://chromium.googlesource.com/chromium/src/+/master/chrome/test/chromedriver/server/http_handler.cc
427
441
  '/session/:sessionId/:vendor/cdp/execute': {
428
442
  POST: { command: 'executeCdp', payloadParams: { required: ['cmd', 'params'] } },
429
443
  },
430
- // #endregion
431
- // #region Webauthn
444
+ // Reporting
445
+ // https://www.w3.org/TR/reporting-1/
446
+ '/session/:sessionId/reporting/generate_test_report': {
447
+ POST: {
448
+ command: 'generateTestReport',
449
+ payloadParams: { required: ['message'], optional: ['group'] },
450
+ },
451
+ },
452
+ // Permissions
453
+ // https://www.w3.org/TR/permissions/
454
+ '/session/:sessionId/permissions': {
455
+ POST: { command: 'setPermissions', payloadParams: { required: ['descriptor', 'state'] } },
456
+ },
457
+ // Device Posture
458
+ // https://www.w3.org/TR/device-posture/
459
+ '/session/:sessionId/deviceposture': {
460
+ POST: { command: 'setDevicePosture', payloadParams: { required: ['posture'] } },
461
+ DELETE: { command: 'clearDevicePosture' },
462
+ },
463
+ // Generic Sensor
464
+ // https://www.w3.org/TR/generic-sensor/
465
+ '/session/:sessionId/sensor': {
466
+ POST: {
467
+ command: 'createVirtualSensor',
468
+ payloadParams: {
469
+ required: ['type'],
470
+ optional: ['connected', 'maxSamplingFrequency', 'minSamplingFrequency'],
471
+ },
472
+ },
473
+ },
474
+ '/session/:sessionId/sensors/:sensorType': {
475
+ GET: { command: 'getVirtualSensorInfo' },
476
+ POST: { command: 'updateVirtualSensorReading', payloadParams: { required: ['reading'] } },
477
+ DELETE: { command: 'deleteVirtualSensor' },
478
+ },
479
+ // Custom Handlers
480
+ // https://html.spec.whatwg.org/multipage/system-state.html#user-agent-automation
481
+ '/session/:sessionId/custom-handlers/set-mode': {
482
+ POST: { command: 'setRPHRegistrationMode', payloadParams: { required: ['mode'] } },
483
+ },
484
+ // Webauthn
432
485
  // https://www.w3.org/TR/webauthn-2/#sctn-automation-add-virtual-authenticator
433
486
  '/session/:sessionId/webauthn/authenticator': {
434
487
  POST: {
@@ -468,6 +521,49 @@ exports.METHOD_MAP = ({
468
521
  },
469
522
  },
470
523
  },
524
+ // Secure Payment Confirmation
525
+ // https://www.w3.org/TR/secure-payment-confirmation/
526
+ '/session/:sessionId/secure-payment-confirmation/set-mode': {
527
+ POST: { command: 'setSPCTransactionMode', payloadParams: { required: ['mode'] } },
528
+ },
529
+ // Federated Credential Management
530
+ // https://www.w3.org/TR/fedcm-1/
531
+ '/session/:sessionId/fedcm/canceldialog': {
532
+ POST: { command: 'fedCMCancelDialog' },
533
+ },
534
+ '/session/:sessionId/fedcm/selectaccount': {
535
+ POST: { command: 'fedCMSelectAccount', payloadParams: { required: ['accountIndex'] } },
536
+ },
537
+ '/session/:sessionId/fedcm/clickdialogbutton': {
538
+ POST: { command: 'fedCMClickDialogButton', payloadParams: { required: ['dialogButton'] } },
539
+ },
540
+ '/session/:sessionId/fedcm/accountlist': {
541
+ GET: { command: 'fedCMGetAccounts' },
542
+ },
543
+ '/session/:sessionId/fedcm/gettitle': {
544
+ GET: { command: 'fedCMGetTitle' },
545
+ },
546
+ '/session/:sessionId/fedcm/getdialogtype': {
547
+ GET: { command: 'fedCMGetDialogType' },
548
+ },
549
+ '/session/:sessionId/fedcm/setdelayenabled': {
550
+ POST: { command: 'fedCMSetDelayEnabled', payloadParams: { required: ['enabled'] } },
551
+ },
552
+ '/session/:sessionId/fedcm/resetcooldown': {
553
+ POST: { command: 'fedCMResetCooldown' },
554
+ },
555
+ // Compute Pressure
556
+ // https://www.w3.org/TR/compute-pressure/
557
+ '/session/:sessionId/pressuresource': {
558
+ POST: {
559
+ command: 'createVirtualPressureSource',
560
+ payloadParams: { required: ['type'], optional: ['supported'] },
561
+ },
562
+ },
563
+ '/session/:sessionId/pressuresource/:pressureSourceType': {
564
+ POST: { command: 'updateVirtualPressureSource', payloadParams: { required: ['sample'] } },
565
+ DELETE: { command: 'deleteVirtualPressureSource' },
566
+ },
471
567
  // #endregion
472
568
  });
473
569
  // driver command names