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