@limrun/appium-xcuitest-driver 10.4.3-lim.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.
- package/CHANGELOG.md +2600 -0
- package/LICENSE +201 -0
- package/README.md +55 -0
- package/build/index.d.ts +5 -0
- package/build/index.js +41 -0
- package/build/lib/app-infos-cache.d.ts +62 -0
- package/build/lib/app-infos-cache.d.ts.map +1 -0
- package/build/lib/app-infos-cache.js +180 -0
- package/build/lib/app-infos-cache.js.map +1 -0
- package/build/lib/app-utils.d.ts +89 -0
- package/build/lib/app-utils.d.ts.map +1 -0
- package/build/lib/app-utils.js +657 -0
- package/build/lib/app-utils.js.map +1 -0
- package/build/lib/commands/active-app-info.d.ts +9 -0
- package/build/lib/commands/active-app-info.d.ts.map +1 -0
- package/build/lib/commands/active-app-info.js +14 -0
- package/build/lib/commands/active-app-info.js.map +1 -0
- package/build/lib/commands/advanced-battery-types.d.ts +444 -0
- package/build/lib/commands/advanced-battery-types.d.ts.map +1 -0
- package/build/lib/commands/advanced-battery-types.js +8 -0
- package/build/lib/commands/advanced-battery-types.js.map +1 -0
- package/build/lib/commands/alert.d.ts +45 -0
- package/build/lib/commands/alert.d.ts.map +1 -0
- package/build/lib/commands/alert.js +87 -0
- package/build/lib/commands/alert.js.map +1 -0
- package/build/lib/commands/app-management.d.ts +153 -0
- package/build/lib/commands/app-management.d.ts.map +1 -0
- package/build/lib/commands/app-management.js +323 -0
- package/build/lib/commands/app-management.js.map +1 -0
- package/build/lib/commands/app-strings.d.ts +16 -0
- package/build/lib/commands/app-strings.d.ts.map +1 -0
- package/build/lib/commands/app-strings.js +30 -0
- package/build/lib/commands/app-strings.js.map +1 -0
- package/build/lib/commands/appearance.d.ts +22 -0
- package/build/lib/commands/appearance.d.ts.map +1 -0
- package/build/lib/commands/appearance.js +74 -0
- package/build/lib/commands/appearance.js.map +1 -0
- package/build/lib/commands/audit.d.ts +43 -0
- package/build/lib/commands/audit.d.ts.map +1 -0
- package/build/lib/commands/audit.js +31 -0
- package/build/lib/commands/audit.js.map +1 -0
- package/build/lib/commands/battery.d.ts +13 -0
- package/build/lib/commands/battery.d.ts.map +1 -0
- package/build/lib/commands/battery.js +49 -0
- package/build/lib/commands/battery.js.map +1 -0
- package/build/lib/commands/bidi/constants.d.ts +6 -0
- package/build/lib/commands/bidi/constants.d.ts.map +1 -0
- package/build/lib/commands/bidi/constants.js +10 -0
- package/build/lib/commands/bidi/constants.js.map +1 -0
- package/build/lib/commands/bidi/models.d.ts +9 -0
- package/build/lib/commands/bidi/models.d.ts.map +1 -0
- package/build/lib/commands/bidi/models.js +54 -0
- package/build/lib/commands/bidi/models.js.map +1 -0
- package/build/lib/commands/bidi/types.d.ts +26 -0
- package/build/lib/commands/bidi/types.d.ts.map +1 -0
- package/build/lib/commands/bidi/types.js +4 -0
- package/build/lib/commands/bidi/types.js.map +1 -0
- package/build/lib/commands/biometric.d.ts +32 -0
- package/build/lib/commands/biometric.d.ts.map +1 -0
- package/build/lib/commands/biometric.js +54 -0
- package/build/lib/commands/biometric.js.map +1 -0
- package/build/lib/commands/certificate.d.ts +50 -0
- package/build/lib/commands/certificate.d.ts.map +1 -0
- package/build/lib/commands/certificate.js +454 -0
- package/build/lib/commands/certificate.js.map +1 -0
- package/build/lib/commands/clipboard.d.ts +21 -0
- package/build/lib/commands/clipboard.d.ts.map +1 -0
- package/build/lib/commands/clipboard.js +36 -0
- package/build/lib/commands/clipboard.js.map +1 -0
- package/build/lib/commands/condition.d.ts +102 -0
- package/build/lib/commands/condition.d.ts.map +1 -0
- package/build/lib/commands/condition.js +146 -0
- package/build/lib/commands/condition.js.map +1 -0
- package/build/lib/commands/content-size.d.ts +30 -0
- package/build/lib/commands/content-size.d.ts.map +1 -0
- package/build/lib/commands/content-size.js +67 -0
- package/build/lib/commands/content-size.js.map +1 -0
- package/build/lib/commands/context.d.ts +191 -0
- package/build/lib/commands/context.d.ts.map +1 -0
- package/build/lib/commands/context.js +625 -0
- package/build/lib/commands/context.js.map +1 -0
- package/build/lib/commands/deviceInfo.d.ts +12 -0
- package/build/lib/commands/deviceInfo.d.ts.map +1 -0
- package/build/lib/commands/deviceInfo.js +25 -0
- package/build/lib/commands/deviceInfo.js.map +1 -0
- package/build/lib/commands/element.d.ts +108 -0
- package/build/lib/commands/element.d.ts.map +1 -0
- package/build/lib/commands/element.js +395 -0
- package/build/lib/commands/element.js.map +1 -0
- package/build/lib/commands/enum.d.ts +105 -0
- package/build/lib/commands/enum.d.ts.map +1 -0
- package/build/lib/commands/enum.js +113 -0
- package/build/lib/commands/enum.js.map +1 -0
- package/build/lib/commands/execute.d.ts +33 -0
- package/build/lib/commands/execute.d.ts.map +1 -0
- package/build/lib/commands/execute.js +142 -0
- package/build/lib/commands/execute.js.map +1 -0
- package/build/lib/commands/file-movement.d.ts +90 -0
- package/build/lib/commands/file-movement.d.ts.map +1 -0
- package/build/lib/commands/file-movement.js +477 -0
- package/build/lib/commands/file-movement.js.map +1 -0
- package/build/lib/commands/find.d.ts +21 -0
- package/build/lib/commands/find.d.ts.map +1 -0
- package/build/lib/commands/find.js +199 -0
- package/build/lib/commands/find.js.map +1 -0
- package/build/lib/commands/general.d.ts +137 -0
- package/build/lib/commands/general.d.ts.map +1 -0
- package/build/lib/commands/general.js +270 -0
- package/build/lib/commands/general.js.map +1 -0
- package/build/lib/commands/geolocation.d.ts +57 -0
- package/build/lib/commands/geolocation.d.ts.map +1 -0
- package/build/lib/commands/geolocation.js +58 -0
- package/build/lib/commands/geolocation.js.map +1 -0
- package/build/lib/commands/gesture.d.ts +283 -0
- package/build/lib/commands/gesture.d.ts.map +1 -0
- package/build/lib/commands/gesture.js +565 -0
- package/build/lib/commands/gesture.js.map +1 -0
- package/build/lib/commands/hid-event.d.ts +2773 -0
- package/build/lib/commands/hid-event.d.ts.map +1 -0
- package/build/lib/commands/hid-event.js +1633 -0
- package/build/lib/commands/hid-event.js.map +1 -0
- package/build/lib/commands/increase-contrast.d.ts +24 -0
- package/build/lib/commands/increase-contrast.d.ts.map +1 -0
- package/build/lib/commands/increase-contrast.js +49 -0
- package/build/lib/commands/increase-contrast.js.map +1 -0
- package/build/lib/commands/iohid.d.ts +1372 -0
- package/build/lib/commands/iohid.d.ts.map +1 -0
- package/build/lib/commands/iohid.js +63 -0
- package/build/lib/commands/iohid.js.map +1 -0
- package/build/lib/commands/keyboard.d.ts +32 -0
- package/build/lib/commands/keyboard.d.ts.map +1 -0
- package/build/lib/commands/keyboard.js +67 -0
- package/build/lib/commands/keyboard.js.map +1 -0
- package/build/lib/commands/keychains.d.ts +10 -0
- package/build/lib/commands/keychains.d.ts.map +1 -0
- package/build/lib/commands/keychains.js +22 -0
- package/build/lib/commands/keychains.js.map +1 -0
- package/build/lib/commands/localization.d.ts +17 -0
- package/build/lib/commands/localization.d.ts.map +1 -0
- package/build/lib/commands/localization.js +34 -0
- package/build/lib/commands/localization.js.map +1 -0
- package/build/lib/commands/location.d.ts +40 -0
- package/build/lib/commands/location.d.ts.map +1 -0
- package/build/lib/commands/location.js +121 -0
- package/build/lib/commands/location.js.map +1 -0
- package/build/lib/commands/lock.d.ts +23 -0
- package/build/lib/commands/lock.d.ts.map +1 -0
- package/build/lib/commands/lock.js +49 -0
- package/build/lib/commands/lock.js.map +1 -0
- package/build/lib/commands/log.d.ts +68 -0
- package/build/lib/commands/log.d.ts.map +1 -0
- package/build/lib/commands/log.js +287 -0
- package/build/lib/commands/log.js.map +1 -0
- package/build/lib/commands/memory.d.ts +11 -0
- package/build/lib/commands/memory.d.ts.map +1 -0
- package/build/lib/commands/memory.js +49 -0
- package/build/lib/commands/memory.js.map +1 -0
- package/build/lib/commands/navigation.d.ts +44 -0
- package/build/lib/commands/navigation.d.ts.map +1 -0
- package/build/lib/commands/navigation.js +121 -0
- package/build/lib/commands/navigation.js.map +1 -0
- package/build/lib/commands/notifications.d.ts +28 -0
- package/build/lib/commands/notifications.d.ts.map +1 -0
- package/build/lib/commands/notifications.js +64 -0
- package/build/lib/commands/notifications.js.map +1 -0
- package/build/lib/commands/pasteboard.d.ts +23 -0
- package/build/lib/commands/pasteboard.d.ts.map +1 -0
- package/build/lib/commands/pasteboard.js +43 -0
- package/build/lib/commands/pasteboard.js.map +1 -0
- package/build/lib/commands/pcap.d.ts +54 -0
- package/build/lib/commands/pcap.d.ts.map +1 -0
- package/build/lib/commands/pcap.js +149 -0
- package/build/lib/commands/pcap.js.map +1 -0
- package/build/lib/commands/performance.d.ts +85 -0
- package/build/lib/commands/performance.d.ts.map +1 -0
- package/build/lib/commands/performance.js +331 -0
- package/build/lib/commands/performance.js.map +1 -0
- package/build/lib/commands/permissions.d.ts +36 -0
- package/build/lib/commands/permissions.d.ts.map +1 -0
- package/build/lib/commands/permissions.js +80 -0
- package/build/lib/commands/permissions.js.map +1 -0
- package/build/lib/commands/proxy-helper.d.ts +15 -0
- package/build/lib/commands/proxy-helper.d.ts.map +1 -0
- package/build/lib/commands/proxy-helper.js +117 -0
- package/build/lib/commands/proxy-helper.js.map +1 -0
- package/build/lib/commands/record-audio.d.ts +69 -0
- package/build/lib/commands/record-audio.d.ts.map +1 -0
- package/build/lib/commands/record-audio.js +228 -0
- package/build/lib/commands/record-audio.js.map +1 -0
- package/build/lib/commands/recordscreen.d.ts +89 -0
- package/build/lib/commands/recordscreen.d.ts.map +1 -0
- package/build/lib/commands/recordscreen.js +326 -0
- package/build/lib/commands/recordscreen.js.map +1 -0
- package/build/lib/commands/screenshots.d.ts +16 -0
- package/build/lib/commands/screenshots.d.ts.map +1 -0
- package/build/lib/commands/screenshots.js +129 -0
- package/build/lib/commands/screenshots.js.map +1 -0
- package/build/lib/commands/simctl.d.ts +27 -0
- package/build/lib/commands/simctl.d.ts.map +1 -0
- package/build/lib/commands/simctl.js +65 -0
- package/build/lib/commands/simctl.js.map +1 -0
- package/build/lib/commands/source.d.ts +16 -0
- package/build/lib/commands/source.d.ts.map +1 -0
- package/build/lib/commands/source.js +128 -0
- package/build/lib/commands/source.js.map +1 -0
- package/build/lib/commands/timeouts.d.ts +53 -0
- package/build/lib/commands/timeouts.d.ts.map +1 -0
- package/build/lib/commands/timeouts.js +71 -0
- package/build/lib/commands/timeouts.js.map +1 -0
- package/build/lib/commands/types.d.ts +539 -0
- package/build/lib/commands/types.d.ts.map +1 -0
- package/build/lib/commands/types.js +3 -0
- package/build/lib/commands/types.js.map +1 -0
- package/build/lib/commands/web.d.ts +297 -0
- package/build/lib/commands/web.d.ts.map +1 -0
- package/build/lib/commands/web.js +1029 -0
- package/build/lib/commands/web.js.map +1 -0
- package/build/lib/commands/xctest-record-screen.d.ts +92 -0
- package/build/lib/commands/xctest-record-screen.d.ts.map +1 -0
- package/build/lib/commands/xctest-record-screen.js +193 -0
- package/build/lib/commands/xctest-record-screen.js.map +1 -0
- package/build/lib/commands/xctest.d.ts +71 -0
- package/build/lib/commands/xctest.d.ts.map +1 -0
- package/build/lib/commands/xctest.js +257 -0
- package/build/lib/commands/xctest.js.map +1 -0
- package/build/lib/css-converter.d.ts +10 -0
- package/build/lib/css-converter.d.ts.map +1 -0
- package/build/lib/css-converter.js +258 -0
- package/build/lib/css-converter.js.map +1 -0
- package/build/lib/desired-caps.d.ts +506 -0
- package/build/lib/desired-caps.d.ts.map +1 -0
- package/build/lib/desired-caps.js +400 -0
- package/build/lib/desired-caps.js.map +1 -0
- package/build/lib/device-connections-factory.d.ts +13 -0
- package/build/lib/device-connections-factory.d.ts.map +1 -0
- package/build/lib/device-connections-factory.js +244 -0
- package/build/lib/device-connections-factory.js.map +1 -0
- package/build/lib/device-log/helpers.d.ts +10 -0
- package/build/lib/device-log/helpers.d.ts.map +1 -0
- package/build/lib/device-log/helpers.js +37 -0
- package/build/lib/device-log/helpers.js.map +1 -0
- package/build/lib/device-log/ios-crash-log.d.ts +34 -0
- package/build/lib/device-log/ios-crash-log.d.ts.map +1 -0
- package/build/lib/device-log/ios-crash-log.js +141 -0
- package/build/lib/device-log/ios-crash-log.js.map +1 -0
- package/build/lib/device-log/ios-device-log.d.ts +19 -0
- package/build/lib/device-log/ios-device-log.d.ts.map +1 -0
- package/build/lib/device-log/ios-device-log.js +42 -0
- package/build/lib/device-log/ios-device-log.js.map +1 -0
- package/build/lib/device-log/ios-log.d.ts +24 -0
- package/build/lib/device-log/ios-log.d.ts.map +1 -0
- package/build/lib/device-log/ios-log.js +50 -0
- package/build/lib/device-log/ios-log.js.map +1 -0
- package/build/lib/device-log/ios-performance-log.d.ts +18 -0
- package/build/lib/device-log/ios-performance-log.d.ts.map +1 -0
- package/build/lib/device-log/ios-performance-log.js +43 -0
- package/build/lib/device-log/ios-performance-log.js.map +1 -0
- package/build/lib/device-log/ios-simulator-log.d.ts +38 -0
- package/build/lib/device-log/ios-simulator-log.d.ts.map +1 -0
- package/build/lib/device-log/ios-simulator-log.js +184 -0
- package/build/lib/device-log/ios-simulator-log.js.map +1 -0
- package/build/lib/device-log/line-consuming-log.d.ts +9 -0
- package/build/lib/device-log/line-consuming-log.d.ts.map +1 -0
- package/build/lib/device-log/line-consuming-log.js +16 -0
- package/build/lib/device-log/line-consuming-log.js.map +1 -0
- package/build/lib/device-log/safari-console-log.d.ts +67 -0
- package/build/lib/device-log/safari-console-log.d.ts.map +1 -0
- package/build/lib/device-log/safari-console-log.js +81 -0
- package/build/lib/device-log/safari-console-log.js.map +1 -0
- package/build/lib/device-log/safari-network-log.d.ts +75 -0
- package/build/lib/device-log/safari-network-log.d.ts.map +1 -0
- package/build/lib/device-log/safari-network-log.js +47 -0
- package/build/lib/device-log/safari-network-log.js.map +1 -0
- package/build/lib/doctor/checks.d.ts +3 -0
- package/build/lib/doctor/checks.d.ts.map +1 -0
- package/build/lib/doctor/checks.js +39 -0
- package/build/lib/doctor/checks.js.map +1 -0
- package/build/lib/doctor/optional-checks.d.ts +46 -0
- package/build/lib/doctor/optional-checks.d.ts.map +1 -0
- package/build/lib/doctor/optional-checks.js +129 -0
- package/build/lib/doctor/optional-checks.js.map +1 -0
- package/build/lib/doctor/required-checks.d.ts +42 -0
- package/build/lib/doctor/required-checks.d.ts.map +1 -0
- package/build/lib/doctor/required-checks.js +94 -0
- package/build/lib/doctor/required-checks.js.map +1 -0
- package/build/lib/doctor/utils.d.ts +8 -0
- package/build/lib/doctor/utils.d.ts.map +1 -0
- package/build/lib/doctor/utils.js +21 -0
- package/build/lib/doctor/utils.js.map +1 -0
- package/build/lib/driver.d.ts +2429 -0
- package/build/lib/driver.d.ts.map +1 -0
- package/build/lib/driver.js +1967 -0
- package/build/lib/driver.js.map +1 -0
- package/build/lib/execute-method-map.d.ts +552 -0
- package/build/lib/execute-method-map.d.ts.map +1 -0
- package/build/lib/execute-method-map.js +586 -0
- package/build/lib/execute-method-map.js.map +1 -0
- package/build/lib/ios-fs-helpers.d.ts +75 -0
- package/build/lib/ios-fs-helpers.d.ts.map +1 -0
- package/build/lib/ios-fs-helpers.js +370 -0
- package/build/lib/ios-fs-helpers.js.map +1 -0
- package/build/lib/ios-generic-simulators.d.ts +6 -0
- package/build/lib/ios-generic-simulators.d.ts.map +1 -0
- package/build/lib/ios-generic-simulators.js +14 -0
- package/build/lib/ios-generic-simulators.js.map +1 -0
- package/build/lib/logger.d.ts +3 -0
- package/build/lib/logger.d.ts.map +1 -0
- package/build/lib/logger.js +6 -0
- package/build/lib/logger.js.map +1 -0
- package/build/lib/method-map.d.ts +229 -0
- package/build/lib/method-map.d.ts.map +1 -0
- package/build/lib/method-map.js +200 -0
- package/build/lib/method-map.js.map +1 -0
- package/build/lib/real-device-clients/base-device-client.d.ts +22 -0
- package/build/lib/real-device-clients/base-device-client.d.ts.map +1 -0
- package/build/lib/real-device-clients/base-device-client.js +14 -0
- package/build/lib/real-device-clients/base-device-client.js.map +1 -0
- package/build/lib/real-device-clients/py-ios-device-client.d.ts +21 -0
- package/build/lib/real-device-clients/py-ios-device-client.d.ts.map +1 -0
- package/build/lib/real-device-clients/py-ios-device-client.js +125 -0
- package/build/lib/real-device-clients/py-ios-device-client.js.map +1 -0
- package/build/lib/real-device-management.d.ts +53 -0
- package/build/lib/real-device-management.d.ts.map +1 -0
- package/build/lib/real-device-management.js +128 -0
- package/build/lib/real-device-management.js.map +1 -0
- package/build/lib/real-device.d.ts +112 -0
- package/build/lib/real-device.d.ts.map +1 -0
- package/build/lib/real-device.js +352 -0
- package/build/lib/real-device.js.map +1 -0
- package/build/lib/simulator-management.d.ts +96 -0
- package/build/lib/simulator-management.d.ts.map +1 -0
- package/build/lib/simulator-management.js +278 -0
- package/build/lib/simulator-management.js.map +1 -0
- package/build/lib/stubs.d.ts +3 -0
- package/build/lib/stubs.d.ts.map +1 -0
- package/build/lib/stubs.js +3 -0
- package/build/lib/stubs.js.map +1 -0
- package/build/lib/types.d.ts +31 -0
- package/build/lib/types.d.ts.map +1 -0
- package/build/lib/types.js +3 -0
- package/build/lib/types.js.map +1 -0
- package/build/lib/utils.d.ts +191 -0
- package/build/lib/utils.d.ts.map +1 -0
- package/build/lib/utils.js +549 -0
- package/build/lib/utils.js.map +1 -0
- package/build/lib/xcrun.d.ts +3 -0
- package/build/lib/xcrun.d.ts.map +1 -0
- package/build/lib/xcrun.js +17 -0
- package/build/lib/xcrun.js.map +1 -0
- package/index.js +7 -0
- package/lib/app-infos-cache.js +187 -0
- package/lib/app-utils.js +710 -0
- package/lib/commands/active-app-info.js +12 -0
- package/lib/commands/advanced-battery-types.ts +454 -0
- package/lib/commands/alert.js +88 -0
- package/lib/commands/app-management.js +346 -0
- package/lib/commands/app-strings.js +30 -0
- package/lib/commands/appearance.js +71 -0
- package/lib/commands/audit.js +31 -0
- package/lib/commands/battery.js +45 -0
- package/lib/commands/bidi/constants.ts +6 -0
- package/lib/commands/bidi/models.ts +55 -0
- package/lib/commands/bidi/types.ts +31 -0
- package/lib/commands/biometric.js +53 -0
- package/lib/commands/certificate.js +497 -0
- package/lib/commands/clipboard.js +35 -0
- package/lib/commands/condition.js +155 -0
- package/lib/commands/content-size.js +68 -0
- package/lib/commands/context.js +705 -0
- package/lib/commands/deviceInfo.js +27 -0
- package/lib/commands/element.js +423 -0
- package/lib/commands/enum.ts +108 -0
- package/lib/commands/execute.js +153 -0
- package/lib/commands/file-movement.js +510 -0
- package/lib/commands/find.js +205 -0
- package/lib/commands/general.js +278 -0
- package/lib/commands/geolocation.js +56 -0
- package/lib/commands/gesture.js +596 -0
- package/lib/commands/hid-event.ts +1634 -0
- package/lib/commands/increase-contrast.js +50 -0
- package/lib/commands/iohid.js +64 -0
- package/lib/commands/keyboard.js +62 -0
- package/lib/commands/keychains.js +18 -0
- package/lib/commands/localization.js +30 -0
- package/lib/commands/location.js +131 -0
- package/lib/commands/lock.js +46 -0
- package/lib/commands/log.js +327 -0
- package/lib/commands/memory.js +51 -0
- package/lib/commands/navigation.js +125 -0
- package/lib/commands/notifications.js +66 -0
- package/lib/commands/pasteboard.js +42 -0
- package/lib/commands/pcap.js +168 -0
- package/lib/commands/performance.js +392 -0
- package/lib/commands/permissions.js +85 -0
- package/lib/commands/proxy-helper.js +122 -0
- package/lib/commands/record-audio.js +264 -0
- package/lib/commands/recordscreen.js +391 -0
- package/lib/commands/screenshots.js +137 -0
- package/lib/commands/simctl.js +71 -0
- package/lib/commands/source.js +131 -0
- package/lib/commands/timeouts.js +68 -0
- package/lib/commands/types.ts +648 -0
- package/lib/commands/web.js +1113 -0
- package/lib/commands/xctest-record-screen.js +204 -0
- package/lib/commands/xctest.js +285 -0
- package/lib/css-converter.js +311 -0
- package/lib/desired-caps.js +396 -0
- package/lib/device-connections-factory.js +269 -0
- package/lib/device-log/helpers.ts +40 -0
- package/lib/device-log/ios-crash-log.ts +166 -0
- package/lib/device-log/ios-device-log.ts +51 -0
- package/lib/device-log/ios-log.ts +70 -0
- package/lib/device-log/ios-performance-log.ts +50 -0
- package/lib/device-log/ios-simulator-log.ts +202 -0
- package/lib/device-log/line-consuming-log.ts +16 -0
- package/lib/device-log/safari-console-log.ts +117 -0
- package/lib/device-log/safari-network-log.ts +120 -0
- package/lib/doctor/checks.ts +3 -0
- package/lib/doctor/optional-checks.ts +173 -0
- package/lib/doctor/required-checks.ts +120 -0
- package/lib/doctor/utils.ts +18 -0
- package/lib/driver.js +2316 -0
- package/lib/execute-method-map.ts +585 -0
- package/lib/ios-fs-helpers.js +355 -0
- package/lib/ios-generic-simulators.js +11 -0
- package/lib/logger.js +5 -0
- package/lib/method-map.js +196 -0
- package/lib/real-device-clients/base-device-client.ts +34 -0
- package/lib/real-device-clients/py-ios-device-client.ts +149 -0
- package/lib/real-device-management.js +133 -0
- package/lib/real-device.js +347 -0
- package/lib/simulator-management.js +324 -0
- package/lib/stubs.ts +3 -0
- package/lib/types.ts +33 -0
- package/lib/utils.js +551 -0
- package/lib/xcrun.js +16 -0
- package/package.json +175 -0
- package/scripts/build-docs.js +56 -0
- package/scripts/build-wda.js +42 -0
- package/scripts/download-wda-sim.mjs +68 -0
- package/scripts/image-mounter.mjs +239 -0
- package/scripts/open-wda.mjs +15 -0
- package/scripts/tunnel-creation.mjs +359 -0
- package/scripts/utils.js +16 -0
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
import _ from 'lodash';
|
|
2
|
+
import B, {TimeoutError} from 'bluebird';
|
|
3
|
+
import {fs, tempDir, mkdirp, zip, util, timing} from 'appium/support';
|
|
4
|
+
import path from 'path';
|
|
5
|
+
import log from './logger';
|
|
6
|
+
|
|
7
|
+
export const IO_TIMEOUT_MS = 4 * 60 * 1000;
|
|
8
|
+
// Mobile devices use NAND memory modules for the storage,
|
|
9
|
+
// and the parallelism there is not as performant as on regular SSDs
|
|
10
|
+
const MAX_IO_CHUNK_SIZE = 8;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Retrieve a file from a real device
|
|
14
|
+
*
|
|
15
|
+
* @param {any} afcService Apple File Client service instance from
|
|
16
|
+
* 'appium-ios-device' module
|
|
17
|
+
* @param {string} remotePath Relative path to the file on the device
|
|
18
|
+
* @returns {Promise<Buffer>} The file content as a buffer
|
|
19
|
+
*/
|
|
20
|
+
export async function pullFile(afcService, remotePath) {
|
|
21
|
+
const stream = await afcService.createReadStream(remotePath, {autoDestroy: true});
|
|
22
|
+
const pullPromise = new B((resolve, reject) => {
|
|
23
|
+
stream.on('close', resolve);
|
|
24
|
+
stream.on('error', reject);
|
|
25
|
+
}).timeout(IO_TIMEOUT_MS);
|
|
26
|
+
const buffers = [];
|
|
27
|
+
stream.on('data', (data) => buffers.push(data));
|
|
28
|
+
await pullPromise;
|
|
29
|
+
return Buffer.concat(buffers);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Checks a presence of a local folder.
|
|
34
|
+
*
|
|
35
|
+
* @param {string} folderPath Full path to the local folder
|
|
36
|
+
* @returns {Promise<boolean>} True if the folder exists and is actually a folder
|
|
37
|
+
*/
|
|
38
|
+
async function folderExists(folderPath) {
|
|
39
|
+
try {
|
|
40
|
+
return (await fs.stat(folderPath)).isDirectory();
|
|
41
|
+
} catch {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Retrieve a folder from a real device
|
|
48
|
+
*
|
|
49
|
+
* @param {any} afcService Apple File Client service instance from
|
|
50
|
+
* 'appium-ios-device' module
|
|
51
|
+
* @param {string} remoteRootPath Relative path to the folder on the device
|
|
52
|
+
* @returns {Promise<Buffer>} The folder content as a zipped base64-encoded buffer
|
|
53
|
+
*/
|
|
54
|
+
export async function pullFolder(afcService, remoteRootPath) {
|
|
55
|
+
const tmpFolder = await tempDir.openDir();
|
|
56
|
+
try {
|
|
57
|
+
let localTopItem = null;
|
|
58
|
+
let countFilesSuccess = 0;
|
|
59
|
+
let countFilesFail = 0;
|
|
60
|
+
let countFolders = 0;
|
|
61
|
+
const pullPromises = [];
|
|
62
|
+
await afcService.walkDir(remoteRootPath, true, async (remotePath, isDir) => {
|
|
63
|
+
const localPath = path.join(tmpFolder, remotePath);
|
|
64
|
+
const dirname = isDir ? localPath : path.dirname(localPath);
|
|
65
|
+
if (!(await folderExists(dirname))) {
|
|
66
|
+
await mkdirp(dirname);
|
|
67
|
+
}
|
|
68
|
+
if (!localTopItem || localPath.split(path.sep).length < localTopItem.split(path.sep).length) {
|
|
69
|
+
localTopItem = localPath;
|
|
70
|
+
}
|
|
71
|
+
if (isDir) {
|
|
72
|
+
++countFolders;
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const readStream = await afcService.createReadStream(remotePath, {autoDestroy: true});
|
|
77
|
+
const writeStream = fs.createWriteStream(localPath, {autoClose: true});
|
|
78
|
+
pullPromises.push(
|
|
79
|
+
new B((resolve) => {
|
|
80
|
+
writeStream.on('close', () => {
|
|
81
|
+
++countFilesSuccess;
|
|
82
|
+
resolve();
|
|
83
|
+
});
|
|
84
|
+
const onStreamingError = (e) => {
|
|
85
|
+
readStream.unpipe(writeStream);
|
|
86
|
+
log.warn(
|
|
87
|
+
`Cannot pull '${remotePath}' to '${localPath}'. ` +
|
|
88
|
+
`The file will be skipped. Original error: ${e.message}`,
|
|
89
|
+
);
|
|
90
|
+
++countFilesFail;
|
|
91
|
+
resolve();
|
|
92
|
+
};
|
|
93
|
+
writeStream.on('error', onStreamingError);
|
|
94
|
+
readStream.on('error', onStreamingError);
|
|
95
|
+
}).timeout(IO_TIMEOUT_MS),
|
|
96
|
+
);
|
|
97
|
+
readStream.pipe(writeStream);
|
|
98
|
+
if (pullPromises.length >= MAX_IO_CHUNK_SIZE) {
|
|
99
|
+
await B.any(pullPromises);
|
|
100
|
+
for (let i = pullPromises.length - 1; i >= 0; i--) {
|
|
101
|
+
if (pullPromises[i].isFulfilled()) {
|
|
102
|
+
pullPromises.splice(i, 1);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
// Wait for the rest of files to be pulled
|
|
108
|
+
if (!_.isEmpty(pullPromises)) {
|
|
109
|
+
await B.all(pullPromises);
|
|
110
|
+
}
|
|
111
|
+
log.info(
|
|
112
|
+
`Pulled ${util.pluralize('file', countFilesSuccess, true)} out of ` +
|
|
113
|
+
`${countFilesSuccess + countFilesFail} and ${util.pluralize(
|
|
114
|
+
'folder',
|
|
115
|
+
countFolders,
|
|
116
|
+
true,
|
|
117
|
+
)} ` +
|
|
118
|
+
`from '${remoteRootPath}'`,
|
|
119
|
+
);
|
|
120
|
+
return await zip.toInMemoryZip(localTopItem ? path.dirname(localTopItem) : tmpFolder, {
|
|
121
|
+
encodeToBase64: true,
|
|
122
|
+
});
|
|
123
|
+
} finally {
|
|
124
|
+
await fs.rimraf(tmpFolder);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Creates remote folder path recursively. Noop if the given path
|
|
130
|
+
* already exists
|
|
131
|
+
*
|
|
132
|
+
* @param {any} afcService Apple File Client service instance from
|
|
133
|
+
* 'appium-ios-device' module
|
|
134
|
+
* @param {string} remoteRoot The relative path to the remote folder structure
|
|
135
|
+
* to be created
|
|
136
|
+
*/
|
|
137
|
+
async function remoteMkdirp(afcService, remoteRoot) {
|
|
138
|
+
if (remoteRoot === '.' || remoteRoot === '/') {
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
try {
|
|
142
|
+
await afcService.listDirectory(remoteRoot);
|
|
143
|
+
return;
|
|
144
|
+
} catch {
|
|
145
|
+
// This means that the directory is missing and we got an object not found error.
|
|
146
|
+
// Therefore, we are going to the parent
|
|
147
|
+
await remoteMkdirp(afcService, path.dirname(remoteRoot));
|
|
148
|
+
}
|
|
149
|
+
await afcService.createDirectory(remoteRoot);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* @typedef {Object} PushFileOptions
|
|
154
|
+
* @property {number} [timeoutMs=240000] The maximum count of milliceconds to wait until
|
|
155
|
+
* file push is completed. Cannot be lower than 60000ms
|
|
156
|
+
*/
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Pushes a file to a real device
|
|
160
|
+
*
|
|
161
|
+
* @param {any} afcService afcService Apple File Client service instance from
|
|
162
|
+
* 'appium-ios-device' module
|
|
163
|
+
* @param {string|Buffer} localPathOrPayload Either full path to the source file
|
|
164
|
+
* or a buffer payload to be written into the remote destination
|
|
165
|
+
* @param {string} remotePath Relative path to the file on the device. The remote
|
|
166
|
+
* folder structure is created automatically if necessary.
|
|
167
|
+
* @param {PushFileOptions} [opts={}]
|
|
168
|
+
*/
|
|
169
|
+
export async function pushFile(afcService, localPathOrPayload, remotePath, opts = {}) {
|
|
170
|
+
const {timeoutMs = IO_TIMEOUT_MS} = opts;
|
|
171
|
+
const timer = new timing.Timer().start();
|
|
172
|
+
await remoteMkdirp(afcService, path.dirname(remotePath));
|
|
173
|
+
const source = Buffer.isBuffer(localPathOrPayload)
|
|
174
|
+
? localPathOrPayload
|
|
175
|
+
: fs.createReadStream(localPathOrPayload, {autoClose: true});
|
|
176
|
+
const writeStream = await afcService.createWriteStream(remotePath, {
|
|
177
|
+
autoDestroy: true,
|
|
178
|
+
});
|
|
179
|
+
writeStream.on('finish', writeStream.destroy);
|
|
180
|
+
let pushError = null;
|
|
181
|
+
const filePushPromise = new B((resolve, reject) => {
|
|
182
|
+
writeStream.on('close', () => {
|
|
183
|
+
if (pushError) {
|
|
184
|
+
reject(pushError);
|
|
185
|
+
} else {
|
|
186
|
+
resolve();
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
const onStreamError = (e) => {
|
|
190
|
+
if (!Buffer.isBuffer(source)) {
|
|
191
|
+
source.unpipe(writeStream);
|
|
192
|
+
}
|
|
193
|
+
log.debug(e);
|
|
194
|
+
pushError = e;
|
|
195
|
+
};
|
|
196
|
+
writeStream.on('error', onStreamError);
|
|
197
|
+
if (!Buffer.isBuffer(source)) {
|
|
198
|
+
source.on('error', onStreamError);
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
if (Buffer.isBuffer(source)) {
|
|
202
|
+
writeStream.write(source);
|
|
203
|
+
writeStream.end();
|
|
204
|
+
} else {
|
|
205
|
+
source.pipe(writeStream);
|
|
206
|
+
}
|
|
207
|
+
await filePushPromise.timeout(Math.max(timeoutMs, 60000));
|
|
208
|
+
const fileSize = Buffer.isBuffer(localPathOrPayload)
|
|
209
|
+
? localPathOrPayload.length
|
|
210
|
+
: (await fs.stat(localPathOrPayload)).size;
|
|
211
|
+
log.debug(
|
|
212
|
+
`Successfully pushed the file payload (${util.toReadableSizeString(fileSize)}) ` +
|
|
213
|
+
`to the remote location '${remotePath}' in ${timer.getDuration().asMilliSeconds.toFixed(0)}ms`,
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* @typedef {Object} PushFolderOptions
|
|
219
|
+
*
|
|
220
|
+
* @property {number} [timeoutMs=240000] The maximum timeout to wait until a
|
|
221
|
+
* single file is copied
|
|
222
|
+
* @property {boolean} [enableParallelPush=false] Whether to push files in parallel.
|
|
223
|
+
* This usually gives better performance, but might sometimes be less stable.
|
|
224
|
+
*/
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Pushes a folder to a real device
|
|
228
|
+
*
|
|
229
|
+
* @param {any} afcService Apple File Client service instance from
|
|
230
|
+
* 'appium-ios-device' module
|
|
231
|
+
* @param {string} srcRootPath The full path to the source folder
|
|
232
|
+
* @param {string} dstRootPath The relative path to the destination folder. The folder
|
|
233
|
+
* will be deleted if already exists.
|
|
234
|
+
* @param {PushFolderOptions} opts
|
|
235
|
+
*/
|
|
236
|
+
export async function pushFolder(afcService, srcRootPath, dstRootPath, opts = {}) {
|
|
237
|
+
const {timeoutMs = IO_TIMEOUT_MS, enableParallelPush = false} = opts;
|
|
238
|
+
|
|
239
|
+
const timer = new timing.Timer().start();
|
|
240
|
+
const allItems = /** @type {import('path-scurry').Path[]} */ (
|
|
241
|
+
/** @type {unknown} */ (
|
|
242
|
+
await fs.glob('**', {
|
|
243
|
+
cwd: srcRootPath,
|
|
244
|
+
withFileTypes: true,
|
|
245
|
+
})
|
|
246
|
+
)
|
|
247
|
+
);
|
|
248
|
+
log.debug(`Successfully scanned the tree structure of '${srcRootPath}'`);
|
|
249
|
+
// top-level folders go first
|
|
250
|
+
/** @type {string[]} */
|
|
251
|
+
const foldersToPush = allItems
|
|
252
|
+
.filter((x) => x.isDirectory())
|
|
253
|
+
.map((x) => x.relative())
|
|
254
|
+
.sort((a, b) => a.split(path.sep).length - b.split(path.sep).length);
|
|
255
|
+
// larger files go first
|
|
256
|
+
/** @type {string[]} */
|
|
257
|
+
const filesToPush = allItems
|
|
258
|
+
.filter((x) => !x.isDirectory())
|
|
259
|
+
.sort((a, b) => (b.size ?? 0) - (a.size ?? 0))
|
|
260
|
+
.map((x) => x.relative());
|
|
261
|
+
log.debug(
|
|
262
|
+
`Got ${util.pluralize('folder', foldersToPush.length, true)} and ` +
|
|
263
|
+
`${util.pluralize('file', filesToPush.length, true)} to push`,
|
|
264
|
+
);
|
|
265
|
+
// create the folder structure first
|
|
266
|
+
try {
|
|
267
|
+
await afcService.deleteDirectory(dstRootPath);
|
|
268
|
+
} catch {}
|
|
269
|
+
await afcService.createDirectory(dstRootPath);
|
|
270
|
+
for (const relativeFolderPath of foldersToPush) {
|
|
271
|
+
// createDirectory does not accept folder names ending with a path separator
|
|
272
|
+
const absoluteFolderPath = _.trimEnd(path.join(dstRootPath, relativeFolderPath), path.sep);
|
|
273
|
+
if (absoluteFolderPath) {
|
|
274
|
+
await afcService.createDirectory(absoluteFolderPath);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
// do not forget about the root folder
|
|
278
|
+
log.debug(
|
|
279
|
+
`Successfully created the remote folder structure ` +
|
|
280
|
+
`(${util.pluralize('item', foldersToPush.length + 1, true)})`,
|
|
281
|
+
);
|
|
282
|
+
|
|
283
|
+
const _pushFile = async (/** @type {string} */ relativePath) => {
|
|
284
|
+
const absoluteSourcePath = path.join(srcRootPath, relativePath);
|
|
285
|
+
const readStream = fs.createReadStream(absoluteSourcePath, {autoClose: true});
|
|
286
|
+
const absoluteDestinationPath = path.join(dstRootPath, relativePath);
|
|
287
|
+
const writeStream = await afcService.createWriteStream(absoluteDestinationPath, {
|
|
288
|
+
autoDestroy: true,
|
|
289
|
+
});
|
|
290
|
+
writeStream.on('finish', writeStream.destroy);
|
|
291
|
+
let pushError = null;
|
|
292
|
+
const filePushPromise = new B((resolve, reject) => {
|
|
293
|
+
writeStream.on('close', () => {
|
|
294
|
+
if (pushError) {
|
|
295
|
+
reject(pushError);
|
|
296
|
+
} else {
|
|
297
|
+
resolve();
|
|
298
|
+
}
|
|
299
|
+
});
|
|
300
|
+
const onStreamError = (e) => {
|
|
301
|
+
readStream.unpipe(writeStream);
|
|
302
|
+
log.debug(e);
|
|
303
|
+
pushError = e;
|
|
304
|
+
};
|
|
305
|
+
writeStream.on('error', onStreamError);
|
|
306
|
+
readStream.on('error', onStreamError);
|
|
307
|
+
});
|
|
308
|
+
readStream.pipe(writeStream);
|
|
309
|
+
await filePushPromise.timeout(Math.max(timeoutMs - timer.getDuration().asMilliSeconds, 60000));
|
|
310
|
+
};
|
|
311
|
+
|
|
312
|
+
if (enableParallelPush) {
|
|
313
|
+
log.debug(`Proceeding to parallel files push (max ${MAX_IO_CHUNK_SIZE} writers)`);
|
|
314
|
+
const pushPromises = [];
|
|
315
|
+
for (const relativeFilePath of filesToPush) {
|
|
316
|
+
pushPromises.push(B.resolve(_pushFile(relativeFilePath)));
|
|
317
|
+
// keep the push queue filled
|
|
318
|
+
if (pushPromises.length >= MAX_IO_CHUNK_SIZE) {
|
|
319
|
+
await B.any(pushPromises);
|
|
320
|
+
const elapsedMs = timer.getDuration().asMilliSeconds;
|
|
321
|
+
if (elapsedMs > timeoutMs) {
|
|
322
|
+
throw new TimeoutError(`Timed out after ${elapsedMs} ms`);
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
for (let i = pushPromises.length - 1; i >= 0; i--) {
|
|
326
|
+
if (pushPromises[i].isFulfilled()) {
|
|
327
|
+
pushPromises.splice(i, 1);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
if (!_.isEmpty(pushPromises)) {
|
|
332
|
+
const remainingPromises = pushPromises.filter((p) => !p.isFulfilled());
|
|
333
|
+
if (remainingPromises.length > 0) {
|
|
334
|
+
await B.all(remainingPromises).timeout(
|
|
335
|
+
Math.max(timeoutMs - timer.getDuration().asMilliSeconds, 60000),
|
|
336
|
+
);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
} else {
|
|
340
|
+
log.debug(`Proceeding to serial files push`);
|
|
341
|
+
for (const relativeFilePath of filesToPush) {
|
|
342
|
+
await _pushFile(relativeFilePath);
|
|
343
|
+
const elapsedMs = timer.getDuration().asMilliSeconds;
|
|
344
|
+
if (elapsedMs > timeoutMs) {
|
|
345
|
+
throw new TimeoutError(`Timed out after ${elapsedMs} ms`);
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
log.debug(
|
|
351
|
+
`Successfully pushed ${util.pluralize('folder', foldersToPush.length, true)} ` +
|
|
352
|
+
`and ${util.pluralize('file', filesToPush.length, true)} ` +
|
|
353
|
+
`within ${timer.getDuration().asMilliSeconds.toFixed(0)}ms`,
|
|
354
|
+
);
|
|
355
|
+
}
|
package/lib/logger.js
ADDED
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
export const newMethodMap = /** @type {const} */ ({
|
|
2
|
+
'/session/:sessionId/timeouts/async_script': {
|
|
3
|
+
POST: {
|
|
4
|
+
command: 'asyncScriptTimeout',
|
|
5
|
+
payloadParams: {required: ['ms']},
|
|
6
|
+
deprecated: true,
|
|
7
|
+
},
|
|
8
|
+
},
|
|
9
|
+
'/session/:sessionId/timeouts/implicit_wait': {
|
|
10
|
+
POST: {
|
|
11
|
+
command: 'implicitWait',
|
|
12
|
+
payloadParams: {required: ['ms']},
|
|
13
|
+
deprecated: true
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
'/session/:sessionId/window/:windowhandle/size': {
|
|
17
|
+
GET: {
|
|
18
|
+
command: 'getWindowSize',
|
|
19
|
+
deprecated: true
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
'/session/:sessionId/element/:elementId/submit': {
|
|
23
|
+
POST: {
|
|
24
|
+
command: 'submit',
|
|
25
|
+
deprecated: true
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
'/session/:sessionId/keys': {
|
|
29
|
+
POST: {
|
|
30
|
+
command: 'keys',
|
|
31
|
+
payloadParams: {required: ['value']},
|
|
32
|
+
deprecated: true
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
'/session/:sessionId/element/:elementId/location': {
|
|
36
|
+
GET: {
|
|
37
|
+
command: 'getLocation',
|
|
38
|
+
deprecated: true
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
'/session/:sessionId/element/:elementId/location_in_view': {
|
|
42
|
+
GET: {
|
|
43
|
+
command: 'getLocationInView',
|
|
44
|
+
deprecated: true
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
'/session/:sessionId/element/:elementId/size': {
|
|
48
|
+
GET: {
|
|
49
|
+
command: 'getSize',
|
|
50
|
+
deprecated: true
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
'/session/:sessionId/appium/device/shake': {
|
|
54
|
+
POST: {
|
|
55
|
+
command: 'mobileShake',
|
|
56
|
+
deprecated: true
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
'/session/:sessionId/appium/device/lock': {
|
|
60
|
+
POST: {
|
|
61
|
+
command: 'lock',
|
|
62
|
+
payloadParams: {optional: ['seconds']},
|
|
63
|
+
deprecated: true
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
'/session/:sessionId/appium/device/unlock': {
|
|
67
|
+
POST: {
|
|
68
|
+
command: 'unlock',
|
|
69
|
+
deprecated: true
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
'/session/:sessionId/appium/device/is_locked': {
|
|
73
|
+
POST: {
|
|
74
|
+
command: 'isLocked',
|
|
75
|
+
deprecated: true
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
'/session/:sessionId/appium/start_recording_screen': {
|
|
79
|
+
POST: {
|
|
80
|
+
command: 'startRecordingScreen',
|
|
81
|
+
payloadParams: {optional: ['options']},
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
'/session/:sessionId/appium/stop_recording_screen': {
|
|
85
|
+
POST: {
|
|
86
|
+
command: 'stopRecordingScreen',
|
|
87
|
+
payloadParams: {optional: ['options']},
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
'/session/:sessionId/appium/device/app_state': {
|
|
91
|
+
POST: {
|
|
92
|
+
command: 'queryAppState',
|
|
93
|
+
payloadParams: {required: [['appId'], ['bundleId']]},
|
|
94
|
+
deprecated: true
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
'/session/:sessionId/appium/simulator/touch_id': {
|
|
98
|
+
POST: {
|
|
99
|
+
command: 'touchId',
|
|
100
|
+
payloadParams: {required: ['match']},
|
|
101
|
+
deprecated: true
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
'/session/:sessionId/appium/simulator/toggle_touch_id_enrollment': {
|
|
105
|
+
POST: {
|
|
106
|
+
command: 'toggleEnrollTouchId',
|
|
107
|
+
payloadParams: {optional: ['enabled']},
|
|
108
|
+
deprecated: true
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
'/session/:sessionId/appium/app/launch': {
|
|
112
|
+
POST: {
|
|
113
|
+
command: 'launchApp',
|
|
114
|
+
deprecated: true
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
'/session/:sessionId/appium/app/close': {
|
|
118
|
+
POST: {
|
|
119
|
+
command: 'closeApp',
|
|
120
|
+
deprecated: true
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
'/session/:sessionId/appium/app/reset': {
|
|
124
|
+
POST: {
|
|
125
|
+
command: 'reset',
|
|
126
|
+
deprecated: true
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
'/session/:sessionId/appium/app/background': {
|
|
130
|
+
POST: {
|
|
131
|
+
command: 'background',
|
|
132
|
+
payloadParams: {required: ['seconds']},
|
|
133
|
+
deprecated: true
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
'/session/:sessionId/appium/app/strings': {
|
|
137
|
+
POST: {
|
|
138
|
+
command: 'getStrings',
|
|
139
|
+
payloadParams: {optional: ['language', 'stringFile']},
|
|
140
|
+
deprecated: true
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
'/session/:sessionId/appium/element/:elementId/value': {
|
|
144
|
+
POST: {
|
|
145
|
+
command: 'setValueImmediate',
|
|
146
|
+
payloadParams: {required: ['text']},
|
|
147
|
+
deprecated: true
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
'/session/:sessionId/appium/receive_async_response': {
|
|
151
|
+
POST: {
|
|
152
|
+
command: 'receiveAsyncResponse',
|
|
153
|
+
payloadParams: {required: ['response']},
|
|
154
|
+
deprecated: true
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
'/session/:sessionId/appium/device/get_clipboard': {
|
|
158
|
+
POST: {
|
|
159
|
+
command: 'getClipboard',
|
|
160
|
+
payloadParams: {optional: ['contentType']},
|
|
161
|
+
deprecated: true
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
'/session/:sessionId/appium/device/set_clipboard': {
|
|
165
|
+
POST: {
|
|
166
|
+
command: 'setClipboard',
|
|
167
|
+
payloadParams: {
|
|
168
|
+
required: ['content'],
|
|
169
|
+
optional: ['contentType', 'label'],
|
|
170
|
+
},
|
|
171
|
+
deprecated: true
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
'/session/:sessionId/log': {
|
|
175
|
+
POST: {
|
|
176
|
+
command: 'getLog',
|
|
177
|
+
payloadParams: {required: ['type']},
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
'/session/:sessionId/log/types': {
|
|
181
|
+
GET: {
|
|
182
|
+
command: 'getLogTypes',
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
'/session/:sessionId/location': {
|
|
186
|
+
GET: {
|
|
187
|
+
command: 'getGeoLocation',
|
|
188
|
+
deprecated: true,
|
|
189
|
+
},
|
|
190
|
+
POST: {
|
|
191
|
+
command: 'setGeoLocation',
|
|
192
|
+
payloadParams: {required: ['location']},
|
|
193
|
+
deprecated: true,
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { AppiumLogger } from '@appium/types';
|
|
2
|
+
import type { SubProcess } from 'teen_process';
|
|
3
|
+
|
|
4
|
+
export interface BaseDeviceClientOptions {
|
|
5
|
+
log: AppiumLogger;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface InstallProfileArgs {
|
|
9
|
+
profilePath?: string;
|
|
10
|
+
payload?: string|Buffer;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export abstract class BaseDeviceClient {
|
|
14
|
+
private readonly _log: AppiumLogger;
|
|
15
|
+
|
|
16
|
+
constructor (opts: BaseDeviceClientOptions) {
|
|
17
|
+
this._log = opts.log;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
get log(): AppiumLogger {
|
|
21
|
+
return this._log;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
abstract assertExists(isStrict: boolean): Promise<boolean>;
|
|
25
|
+
|
|
26
|
+
abstract listProfiles(): Promise<object>;
|
|
27
|
+
abstract installProfile(args: InstallProfileArgs): Promise<void>;
|
|
28
|
+
abstract removeProfile(name: string): Promise<string>;
|
|
29
|
+
|
|
30
|
+
abstract listCrashes(): Promise<string[]>;
|
|
31
|
+
abstract exportCrash(name: string, dstFolder: string): Promise<void>;
|
|
32
|
+
|
|
33
|
+
abstract collectPcap(dstFile: string): Promise<SubProcess>;
|
|
34
|
+
}
|