@appium/base-driver 9.1.0 → 9.3.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 (38) 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 +1 -1
  4. package/build/lib/basedriver/commands/execute.d.ts.map +1 -1
  5. package/build/lib/basedriver/commands/execute.js +2 -24
  6. package/build/lib/basedriver/commands/execute.js.map +1 -1
  7. package/build/lib/basedriver/commands/session.d.ts.map +1 -1
  8. package/build/lib/basedriver/commands/session.js +1 -0
  9. package/build/lib/basedriver/commands/session.js.map +1 -1
  10. package/build/lib/basedriver/driver.d.ts.map +1 -1
  11. package/build/lib/basedriver/driver.js +1 -1
  12. package/build/lib/basedriver/driver.js.map +1 -1
  13. package/build/lib/index.d.ts +1 -1
  14. package/build/lib/index.d.ts.map +1 -1
  15. package/build/lib/index.js +2 -1
  16. package/build/lib/index.js.map +1 -1
  17. package/build/lib/protocol/index.d.ts +2 -1
  18. package/build/lib/protocol/index.js +2 -1
  19. package/build/lib/protocol/index.js.map +1 -1
  20. package/build/lib/protocol/protocol.d.ts +3 -0
  21. package/build/lib/protocol/protocol.d.ts.map +1 -1
  22. package/build/lib/protocol/protocol.js +36 -1
  23. package/build/lib/protocol/protocol.js.map +1 -1
  24. package/build/lib/protocol/routes.d.ts +123 -26
  25. package/build/lib/protocol/routes.d.ts.map +1 -1
  26. package/build/lib/protocol/routes.js +91 -94
  27. package/build/lib/protocol/routes.js.map +1 -1
  28. package/build/tsconfig.tsbuildinfo +1 -1
  29. package/lib/basedriver/capabilities.js +1 -1
  30. package/lib/basedriver/commands/execute.js +3 -28
  31. package/lib/basedriver/commands/session.js +1 -0
  32. package/lib/basedriver/driver.js +2 -7
  33. package/lib/index.js +1 -0
  34. package/lib/protocol/index.js +2 -0
  35. package/lib/protocol/protocol.js +43 -0
  36. package/lib/protocol/routes.js +91 -97
  37. package/package.json +9 -7
  38. package/tsconfig.json +14 -0
@@ -68,10 +68,10 @@ const METHOD_MAP = /** @type {const} */ ({
68
68
  },
69
69
  },
70
70
  '/session/:sessionId/timeouts/async_script': {
71
- POST: {command: 'asyncScriptTimeout', payloadParams: {required: ['ms']}},
71
+ POST: {command: 'asyncScriptTimeout', payloadParams: {required: ['ms']}, deprecated: true},
72
72
  },
73
73
  '/session/:sessionId/timeouts/implicit_wait': {
74
- POST: {command: 'implicitWait', payloadParams: {required: ['ms']}},
74
+ POST: {command: 'implicitWait', payloadParams: {required: ['ms']}, deprecated: true},
75
75
  },
76
76
  // JSONWP
77
77
  '/session/:sessionId/window_handle': {
@@ -117,25 +117,25 @@ const METHOD_MAP = /** @type {const} */ ({
117
117
  GET: {command: 'getScreenshot'},
118
118
  },
119
119
  '/session/:sessionId/ime/available_engines': {
120
- GET: {command: 'availableIMEEngines'},
120
+ GET: {command: 'availableIMEEngines', deprecated: true},
121
121
  },
122
122
  '/session/:sessionId/ime/active_engine': {
123
- GET: {command: 'getActiveIMEEngine'},
123
+ GET: {command: 'getActiveIMEEngine', deprecated: true},
124
124
  },
125
125
  '/session/:sessionId/ime/activated': {
126
- GET: {command: 'isIMEActivated'},
126
+ GET: {command: 'isIMEActivated', deprecated: true},
127
127
  },
128
128
  '/session/:sessionId/ime/deactivate': {
129
- POST: {command: 'deactivateIMEEngine'},
129
+ POST: {command: 'deactivateIMEEngine', deprecated: true},
130
130
  },
131
131
  '/session/:sessionId/ime/activate': {
132
- POST: {command: 'activateIMEEngine', payloadParams: {required: ['engine']}},
132
+ POST: {command: 'activateIMEEngine', payloadParams: {required: ['engine']}, deprecated: true},
133
133
  },
134
134
  '/session/:sessionId/frame': {
135
135
  POST: {command: 'setFrame', payloadParams: {required: ['id']}},
136
136
  },
137
137
  '/session/:sessionId/frame/parent': {
138
- POST: {},
138
+ POST: {command: 'switchToParentFrame'},
139
139
  },
140
140
  '/session/:sessionId/window': {
141
141
  GET: {command: 'getWindowHandle'},
@@ -162,12 +162,11 @@ const METHOD_MAP = /** @type {const} */ ({
162
162
  DELETE: {command: 'closeWindow'},
163
163
  },
164
164
  '/session/:sessionId/window/:windowhandle/size': {
165
- GET: {command: 'getWindowSize'},
166
- POST: {},
165
+ GET: {command: 'getWindowSize', deprecated: true},
167
166
  },
168
167
  '/session/:sessionId/window/:windowhandle/position': {
169
- POST: {},
170
- GET: {},
168
+ POST: {deprecated: true},
169
+ GET: {deprecated: true},
171
170
  },
172
171
  '/session/:sessionId/window/:windowhandle/maximize': {
173
172
  POST: {command: 'maximizeWindow'},
@@ -222,7 +221,7 @@ const METHOD_MAP = /** @type {const} */ ({
222
221
  POST: {command: 'click'},
223
222
  },
224
223
  '/session/:sessionId/element/:elementId/submit': {
225
- POST: {command: 'submit'},
224
+ POST: {command: 'submit', deprecated: true},
226
225
  },
227
226
  '/session/:sessionId/element/:elementId/text': {
228
227
  GET: {command: 'getText'},
@@ -246,7 +245,7 @@ const METHOD_MAP = /** @type {const} */ ({
246
245
  },
247
246
  },
248
247
  '/session/:sessionId/keys': {
249
- POST: {command: 'keys', payloadParams: {required: ['value']}},
248
+ POST: {command: 'keys', payloadParams: {required: ['value']}, deprecated: true},
250
249
  },
251
250
  '/session/:sessionId/element/:elementId/name': {
252
251
  GET: {command: 'getName'},
@@ -264,19 +263,19 @@ const METHOD_MAP = /** @type {const} */ ({
264
263
  GET: {command: 'getAttribute'},
265
264
  },
266
265
  '/session/:sessionId/element/:elementId/equals/:otherId': {
267
- GET: {command: 'equalsElement'},
266
+ GET: {command: 'equalsElement', deprecated: true},
268
267
  },
269
268
  '/session/:sessionId/element/:elementId/displayed': {
270
269
  GET: {command: 'elementDisplayed'},
271
270
  },
272
271
  '/session/:sessionId/element/:elementId/location': {
273
- GET: {command: 'getLocation'},
272
+ GET: {command: 'getLocation', deprecated: true},
274
273
  },
275
274
  '/session/:sessionId/element/:elementId/location_in_view': {
276
- GET: {command: 'getLocationInView'},
275
+ GET: {command: 'getLocationInView', deprecated: true},
277
276
  },
278
277
  '/session/:sessionId/element/:elementId/size': {
279
- GET: {command: 'getSize'},
278
+ GET: {command: 'getSize', deprecated: true},
280
279
  },
281
280
  '/session/:sessionId/element/:elementId/shadow': {
282
281
  GET: {command: 'elementShadowRoot'},
@@ -319,34 +318,35 @@ const METHOD_MAP = /** @type {const} */ ({
319
318
  POST: {
320
319
  command: 'moveTo',
321
320
  payloadParams: {optional: ['element', 'xoffset', 'yoffset']},
321
+ deprecated: true,
322
322
  },
323
323
  },
324
324
  '/session/:sessionId/click': {
325
- POST: {command: 'clickCurrent', payloadParams: {optional: ['button']}},
325
+ POST: {command: 'clickCurrent', payloadParams: {optional: ['button']}, deprecated: true},
326
326
  },
327
327
  '/session/:sessionId/buttondown': {
328
- POST: {command: 'buttonDown', payloadParams: {optional: ['button']}},
328
+ POST: {command: 'buttonDown', payloadParams: {optional: ['button']}, deprecated: true},
329
329
  },
330
330
  '/session/:sessionId/buttonup': {
331
- POST: {command: 'buttonUp', payloadParams: {optional: ['button']}},
331
+ POST: {command: 'buttonUp', payloadParams: {optional: ['button']}, deprecated: true},
332
332
  },
333
333
  '/session/:sessionId/doubleclick': {
334
- POST: {command: 'doubleClick'},
334
+ POST: {command: 'doubleClick', deprecated: true},
335
335
  },
336
336
  '/session/:sessionId/touch/click': {
337
- POST: {command: 'click', payloadParams: {required: ['element']}},
337
+ POST: {command: 'click', payloadParams: {required: ['element']}, deprecated: true},
338
338
  },
339
339
  '/session/:sessionId/touch/down': {
340
- POST: {command: 'touchDown', payloadParams: {required: ['x', 'y']}},
340
+ POST: {command: 'touchDown', payloadParams: {required: ['x', 'y']}, deprecated: true},
341
341
  },
342
342
  '/session/:sessionId/touch/up': {
343
- POST: {command: 'touchUp', payloadParams: {required: ['x', 'y']}},
343
+ POST: {command: 'touchUp', payloadParams: {required: ['x', 'y']}, deprecated: true},
344
344
  },
345
345
  '/session/:sessionId/touch/move': {
346
- POST: {command: 'touchMove', payloadParams: {required: ['x', 'y']}},
346
+ POST: {command: 'touchMove', payloadParams: {required: ['x', 'y']}, deprecated: true},
347
347
  },
348
348
  '/session/:sessionId/touch/scroll': {
349
- POST: {},
349
+ POST: {deprecated: true},
350
350
  },
351
351
  '/session/:sessionId/touch/doubleclick': {
352
352
  POST: {},
@@ -356,7 +356,7 @@ const METHOD_MAP = /** @type {const} */ ({
356
356
  DELETE: {command: 'releaseActions'},
357
357
  },
358
358
  '/session/:sessionId/touch/longclick': {
359
- POST: {command: 'touchLongClick', payloadParams: {required: ['elements']}},
359
+ POST: {command: 'touchLongClick', payloadParams: {required: ['elements']}, deprecated: true},
360
360
  },
361
361
  '/session/:sessionId/touch/flick': {
362
362
  POST: {
@@ -364,6 +364,7 @@ const METHOD_MAP = /** @type {const} */ ({
364
364
  payloadParams: {
365
365
  optional: ['element', 'xspeed', 'yspeed', 'xoffset', 'yoffset', 'speed'],
366
366
  },
367
+ deprecated: true,
367
368
  },
368
369
  },
369
370
  '/session/:sessionId/location': {
@@ -371,28 +372,28 @@ const METHOD_MAP = /** @type {const} */ ({
371
372
  POST: {command: 'setGeoLocation', payloadParams: {required: ['location']}},
372
373
  },
373
374
  '/session/:sessionId/local_storage': {
374
- GET: {},
375
- POST: {},
376
- DELETE: {},
375
+ GET: {deprecated: true},
376
+ POST: {deprecated: true},
377
+ DELETE: {deprecated: true},
377
378
  },
378
379
  '/session/:sessionId/local_storage/key/:key': {
379
- GET: {},
380
- DELETE: {},
380
+ GET: {deprecated: true},
381
+ DELETE: {deprecated: true},
381
382
  },
382
383
  '/session/:sessionId/local_storage/size': {
383
- GET: {},
384
+ GET: {deprecated: true},
384
385
  },
385
386
  '/session/:sessionId/session_storage': {
386
- GET: {},
387
- POST: {},
388
- DELETE: {},
387
+ GET: {deprecated: true},
388
+ POST: {deprecated: true},
389
+ DELETE: {deprecated: true},
389
390
  },
390
391
  '/session/:sessionId/session_storage/key/:key': {
391
- GET: {},
392
- DELETE: {},
392
+ GET: {deprecated: true},
393
+ DELETE: {deprecated: true},
393
394
  },
394
395
  '/session/:sessionId/session_storage/size': {
395
- GET: {},
396
+ GET: {deprecated: true},
396
397
  },
397
398
  // Selenium 4 clients
398
399
  '/session/:sessionId/se/log': {
@@ -425,7 +426,7 @@ const METHOD_MAP = /** @type {const} */ ({
425
426
  GET: {command: 'getContexts'},
426
427
  },
427
428
  '/session/:sessionId/element/:elementId/pageIndex': {
428
- GET: {command: 'getPageIndex'},
429
+ GET: {command: 'getPageIndex', deprecated: true},
429
430
  },
430
431
  '/session/:sessionId/network_connection': {
431
432
  GET: {command: 'getNetworkConnection'},
@@ -438,12 +439,14 @@ const METHOD_MAP = /** @type {const} */ ({
438
439
  POST: {
439
440
  command: 'performTouch',
440
441
  payloadParams: {wrap: 'actions', required: ['actions']},
442
+ deprecated: true,
441
443
  },
442
444
  },
443
445
  '/session/:sessionId/touch/multi/perform': {
444
446
  POST: {
445
447
  command: 'performMultiAction',
446
448
  payloadParams: {required: ['actions'], optional: ['elementId']},
449
+ deprecated: true,
447
450
  },
448
451
  },
449
452
  '/session/:sessionId/receive_async_response': {
@@ -453,35 +456,37 @@ const METHOD_MAP = /** @type {const} */ ({
453
456
  },
454
457
  },
455
458
  '/session/:sessionId/appium/device/shake': {
456
- POST: {command: 'mobileShake'},
459
+ POST: {command: 'mobileShake', deprecated: true},
457
460
  },
458
461
  '/session/:sessionId/appium/device/system_time': {
459
462
  GET: {command: 'getDeviceTime', payloadParams: {optional: ['format']}},
460
463
  POST: {command: 'getDeviceTime', payloadParams: {optional: ['format']}},
461
464
  },
462
465
  '/session/:sessionId/appium/device/lock': {
463
- POST: {command: 'lock', payloadParams: {optional: ['seconds']}},
466
+ POST: {command: 'lock', payloadParams: {optional: ['seconds']}, deprecated: true},
464
467
  },
465
468
  '/session/:sessionId/appium/device/unlock': {
466
- POST: {command: 'unlock'},
469
+ POST: {command: 'unlock', deprecated: true},
467
470
  },
468
471
  '/session/:sessionId/appium/device/is_locked': {
469
- POST: {command: 'isLocked'},
472
+ POST: {command: 'isLocked', deprecated: true},
470
473
  },
471
474
  '/session/:sessionId/appium/start_recording_screen': {
472
475
  POST: {
473
476
  command: 'startRecordingScreen',
474
477
  payloadParams: {optional: ['options']},
478
+ deprecated: true,
475
479
  },
476
480
  },
477
481
  '/session/:sessionId/appium/stop_recording_screen': {
478
482
  POST: {
479
483
  command: 'stopRecordingScreen',
480
484
  payloadParams: {optional: ['options']},
485
+ deprecated: true,
481
486
  },
482
487
  },
483
488
  '/session/:sessionId/appium/performanceData/types': {
484
- POST: {command: 'getPerformanceDataTypes'},
489
+ POST: {command: 'getPerformanceDataTypes', deprecated: true},
485
490
  },
486
491
  '/session/:sessionId/appium/getPerformanceData': {
487
492
  POST: {
@@ -490,70 +495,68 @@ const METHOD_MAP = /** @type {const} */ ({
490
495
  required: ['packageName', 'dataType'],
491
496
  optional: ['dataReadTimeout'],
492
497
  },
498
+ deprecated: true,
493
499
  },
494
500
  },
495
501
  '/session/:sessionId/appium/device/press_keycode': {
496
502
  POST: {
497
503
  command: 'pressKeyCode',
498
504
  payloadParams: {required: ['keycode'], optional: ['metastate', 'flags']},
505
+ deprecated: true,
499
506
  },
500
507
  },
501
508
  '/session/:sessionId/appium/device/long_press_keycode': {
502
509
  POST: {
503
510
  command: 'longPressKeyCode',
504
511
  payloadParams: {required: ['keycode'], optional: ['metastate', 'flags']},
512
+ deprecated: true,
505
513
  },
506
514
  },
507
515
  '/session/:sessionId/appium/device/finger_print': {
508
516
  POST: {
509
517
  command: 'fingerprint',
510
518
  payloadParams: {required: ['fingerprintId']},
519
+ deprecated: true,
511
520
  },
512
521
  },
513
522
  '/session/:sessionId/appium/device/send_sms': {
514
523
  POST: {
515
524
  command: 'sendSMS',
516
525
  payloadParams: {required: ['phoneNumber', 'message']},
526
+ deprecated: true,
517
527
  },
518
528
  },
519
529
  '/session/:sessionId/appium/device/gsm_call': {
520
530
  POST: {
521
531
  command: 'gsmCall',
522
532
  payloadParams: {required: ['phoneNumber', 'action']},
533
+ deprecated: true,
523
534
  },
524
535
  },
525
536
  '/session/:sessionId/appium/device/gsm_signal': {
526
537
  POST: {
527
538
  command: 'gsmSignal',
528
- payloadParams: {
529
- validate: (jsonObj) =>
530
- !util.hasValue(jsonObj.signalStrength) &&
531
- !util.hasValue(jsonObj.signalStrengh) &&
532
- 'we require one of "signalStrength" or "signalStrengh" params',
533
- optional: ['signalStrength', 'signalStrengh'],
534
- // backward-compatible. sonObj.signalStrength can be 0
535
- makeArgs: (jsonObj) => [
536
- util.hasValue(jsonObj.signalStrength) ? jsonObj.signalStrength : jsonObj.signalStrengh,
537
- ],
538
- },
539
+ payloadParams: {required: ['signalStrength']},
540
+ deprecated: true,
539
541
  },
540
542
  },
541
543
  '/session/:sessionId/appium/device/gsm_voice': {
542
- POST: {command: 'gsmVoice', payloadParams: {required: ['state']}},
544
+ POST: {command: 'gsmVoice', payloadParams: {required: ['state']}, deprecated: true},
543
545
  },
544
546
  '/session/:sessionId/appium/device/power_capacity': {
545
- POST: {command: 'powerCapacity', payloadParams: {required: ['percent']}},
547
+ POST: {command: 'powerCapacity', payloadParams: {required: ['percent']}, deprecated: true},
546
548
  },
547
549
  '/session/:sessionId/appium/device/power_ac': {
548
- POST: {command: 'powerAC', payloadParams: {required: ['state']}},
550
+ POST: {command: 'powerAC', payloadParams: {required: ['state']}, deprecated: true},
549
551
  },
550
552
  '/session/:sessionId/appium/device/network_speed': {
551
- POST: {command: 'networkSpeed', payloadParams: {required: ['netspeed']}},
553
+ POST: {command: 'networkSpeed', payloadParams: {required: ['netspeed']}, deprecated: true},
552
554
  },
553
555
  '/session/:sessionId/appium/device/keyevent': {
554
556
  POST: {
555
557
  command: 'keyevent',
556
558
  payloadParams: {required: ['keycode'], optional: ['metastate']},
559
+ deprecated: true,
557
560
  },
558
561
  },
559
562
  '/session/:sessionId/appium/device/rotate': {
@@ -563,13 +566,14 @@ const METHOD_MAP = /** @type {const} */ ({
563
566
  required: ['x', 'y', 'radius', 'rotation', 'touchCount', 'duration'],
564
567
  optional: ['element'],
565
568
  },
569
+ deprecated: true,
566
570
  },
567
571
  },
568
572
  '/session/:sessionId/appium/device/current_activity': {
569
- GET: {command: 'getCurrentActivity'},
573
+ GET: {command: 'getCurrentActivity', deprecated: true},
570
574
  },
571
575
  '/session/:sessionId/appium/device/current_package': {
572
- GET: {command: 'getCurrentPackage'},
576
+ GET: {command: 'getCurrentPackage', deprecated: true},
573
577
  },
574
578
  //region Applications Management
575
579
  '/session/:sessionId/appium/device/install_app': {
@@ -628,6 +632,7 @@ const METHOD_MAP = /** @type {const} */ ({
628
632
  payloadParams: {
629
633
  required: [['appId'], ['bundleId']],
630
634
  },
635
+ deprecated: true,
631
636
  },
632
637
  },
633
638
  //endregion
@@ -650,19 +655,19 @@ const METHOD_MAP = /** @type {const} */ ({
650
655
  POST: {command: 'pullFolder', payloadParams: {required: ['path']}},
651
656
  },
652
657
  '/session/:sessionId/appium/device/toggle_airplane_mode': {
653
- POST: {command: 'toggleFlightMode'},
658
+ POST: {command: 'toggleFlightMode', deprecated: true},
654
659
  },
655
660
  '/session/:sessionId/appium/device/toggle_data': {
656
- POST: {command: 'toggleData'},
661
+ POST: {command: 'toggleData', deprecated: true},
657
662
  },
658
663
  '/session/:sessionId/appium/device/toggle_wifi': {
659
- POST: {command: 'toggleWiFi'},
664
+ POST: {command: 'toggleWiFi', deprecated: true},
660
665
  },
661
666
  '/session/:sessionId/appium/device/toggle_location_services': {
662
- POST: {command: 'toggleLocationServices'},
667
+ POST: {command: 'toggleLocationServices', deprecated: true},
663
668
  },
664
669
  '/session/:sessionId/appium/device/open_notifications': {
665
- POST: {command: 'openNotifications'},
670
+ POST: {command: 'openNotifications', deprecated: true},
666
671
  },
667
672
  '/session/:sessionId/appium/device/start_activity': {
668
673
  POST: {
@@ -679,77 +684,63 @@ const METHOD_MAP = /** @type {const} */ ({
679
684
  'dontStopAppOnReset',
680
685
  ],
681
686
  },
687
+ deprecated: true,
682
688
  },
683
689
  },
684
690
  '/session/:sessionId/appium/device/system_bars': {
685
- GET: {command: 'getSystemBars'},
691
+ GET: {command: 'getSystemBars', deprecated: true},
686
692
  },
687
693
  '/session/:sessionId/appium/device/display_density': {
688
- GET: {command: 'getDisplayDensity'},
694
+ GET: {command: 'getDisplayDensity', deprecated: true},
689
695
  },
690
696
  '/session/:sessionId/appium/simulator/touch_id': {
691
- POST: {command: 'touchId', payloadParams: {required: ['match']}},
697
+ POST: {command: 'touchId', payloadParams: {required: ['match']}, deprecated: true},
692
698
  },
693
699
  '/session/:sessionId/appium/simulator/toggle_touch_id_enrollment': {
694
700
  POST: {
695
701
  command: 'toggleEnrollTouchId',
696
702
  payloadParams: {optional: ['enabled']},
703
+ deprecated: true,
697
704
  },
698
705
  },
699
706
  '/session/:sessionId/appium/app/launch': {
700
- POST: {command: 'launchApp'},
707
+ POST: {command: 'launchApp', deprecated: true},
701
708
  },
702
709
  '/session/:sessionId/appium/app/close': {
703
- POST: {command: 'closeApp'},
710
+ POST: {command: 'closeApp', deprecated: true},
704
711
  },
705
712
  '/session/:sessionId/appium/app/reset': {
706
- POST: {command: 'reset'},
713
+ POST: {command: 'reset', deprecated: true},
707
714
  },
708
715
  '/session/:sessionId/appium/app/background': {
709
- POST: {command: 'background', payloadParams: {required: ['seconds']}},
716
+ POST: {command: 'background', payloadParams: {required: ['seconds']}, deprecated: true},
710
717
  },
711
718
  '/session/:sessionId/appium/app/end_test_coverage': {
712
719
  POST: {
713
720
  command: 'endCoverage',
714
721
  payloadParams: {required: ['intent', 'path']},
722
+ deprecated: true,
715
723
  },
716
724
  },
717
725
  '/session/:sessionId/appium/app/strings': {
718
726
  POST: {
719
727
  command: 'getStrings',
720
728
  payloadParams: {optional: ['language', 'stringFile']},
729
+ deprecated: true,
721
730
  },
722
731
  },
723
732
  '/session/:sessionId/appium/element/:elementId/value': {
724
733
  POST: {
725
734
  command: 'setValueImmediate',
726
- payloadParams: {
727
- validate: (jsonObj) =>
728
- !util.hasValue(jsonObj.value) &&
729
- !util.hasValue(jsonObj.text) &&
730
- 'we require one of "text" or "value" params',
731
- optional: ['value', 'text'],
732
- // We want to either a value (old JSONWP) or a text (new W3C) parameter,
733
- // but only send one of them to the command (not both).
734
- // Prefer 'value' since it's more backward-compatible.
735
- makeArgs: (jsonObj) => [jsonObj.value || jsonObj.text],
736
- },
735
+ payloadParams: {required: ['text']},
736
+ deprecated: true,
737
737
  },
738
738
  },
739
739
  '/session/:sessionId/appium/element/:elementId/replace_value': {
740
740
  POST: {
741
741
  command: 'replaceValue',
742
- payloadParams: {
743
- validate: (jsonObj) =>
744
- !util.hasValue(jsonObj.value) &&
745
- !util.hasValue(jsonObj.text) &&
746
- 'we require one of "text" or "value" params',
747
- optional: ['value', 'text'],
748
- // We want to either a value (old JSONWP) or a text (new W3C) parameter,
749
- // but only send one of them to the command (not both).
750
- // Prefer 'value' since it's more backward-compatible.
751
- makeArgs: (jsonObj) => [jsonObj.value ?? jsonObj.text ?? ''],
752
- },
742
+ payloadParams: {required: ['text']},
743
+ deprecated: true,
753
744
  },
754
745
  },
755
746
  '/session/:sessionId/appium/settings': {
@@ -760,6 +751,7 @@ const METHOD_MAP = /** @type {const} */ ({
760
751
  POST: {
761
752
  command: 'receiveAsyncResponse',
762
753
  payloadParams: {required: ['response']},
754
+ deprecated: true,
763
755
  },
764
756
  },
765
757
  '/session/:sessionId/appium/events': {
@@ -857,6 +849,7 @@ const METHOD_MAP = /** @type {const} */ ({
857
849
  required: ['content'],
858
850
  optional: ['contentType', 'label'],
859
851
  },
852
+ deprecated: true,
860
853
  },
861
854
  },
862
855
  '/session/:sessionId/appium/device/get_clipboard': {
@@ -865,6 +858,7 @@ const METHOD_MAP = /** @type {const} */ ({
865
858
  payloadParams: {
866
859
  optional: ['contentType'],
867
860
  },
861
+ deprecated: true,
868
862
  },
869
863
  },
870
864
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appium/base-driver",
3
- "version": "9.1.0",
3
+ "version": "9.3.0",
4
4
  "description": "Base driver class for Appium drivers",
5
5
  "keywords": [
6
6
  "automation",
@@ -32,7 +32,8 @@
32
32
  "index.d.ts",
33
33
  "lib",
34
34
  "static",
35
- "build"
35
+ "build",
36
+ "tsconfig.json"
36
37
  ],
37
38
  "scripts": {
38
39
  "test": "npm run test:unit",
@@ -41,7 +42,8 @@
41
42
  "test:unit": "mocha \"./test/unit/**/*.spec.js\""
42
43
  },
43
44
  "dependencies": {
44
- "@appium/support": "^3.0.1",
45
+ "@appium/support": "^3.1.4",
46
+ "@appium/types": "^0.9.0",
45
47
  "@colors/colors": "1.5.0",
46
48
  "@types/async-lock": "1.3.0",
47
49
  "@types/bluebird": "3.5.38",
@@ -50,7 +52,7 @@
50
52
  "@types/serve-favicon": "2.5.3",
51
53
  "async-lock": "1.4.0",
52
54
  "asyncbox": "2.9.4",
53
- "axios": "1.2.1",
55
+ "axios": "1.2.2",
54
56
  "bluebird": "3.7.2",
55
57
  "body-parser": "1.20.1",
56
58
  "es6-error": "4.1.1",
@@ -62,7 +64,7 @@
62
64
  "morgan": "1.10.0",
63
65
  "serve-favicon": "2.5.0",
64
66
  "source-map-support": "0.5.21",
65
- "type-fest": "3.4.0",
67
+ "type-fest": "3.5.3",
66
68
  "validate.js": "0.13.1"
67
69
  },
68
70
  "engines": {
@@ -72,8 +74,8 @@
72
74
  "publishConfig": {
73
75
  "access": "public"
74
76
  },
75
- "gitHead": "2e76ba9607729f59ca967e47c2cba738e90a57b8",
77
+ "gitHead": "f1e0a46712b76564cd44c37657882308a7bac706",
76
78
  "typedoc": {
77
- "entryPoint": "./build/lib/index.js"
79
+ "entryPoint": "./lib/index.js"
78
80
  }
79
81
  }
package/tsconfig.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "extends": "@appium/tsconfig/tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "build",
5
+ "paths": {
6
+ "@appium/support": ["../support"],
7
+ "@appium/types": ["../types"],
8
+ "@appium/driver-test-support": ["../driver-test-support"]
9
+ },
10
+ "checkJs": true
11
+ },
12
+ "include": ["lib"],
13
+ "references": [{"path": "../support"}, {"path": "../types"}]
14
+ }