@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,122 @@
|
|
|
1
|
+
import {errors, routeToCommandName} from 'appium/driver';
|
|
2
|
+
import B from 'bluebird';
|
|
3
|
+
|
|
4
|
+
const GET = 'GET';
|
|
5
|
+
const POST = 'POST';
|
|
6
|
+
const DELETE = 'DELETE';
|
|
7
|
+
const SUPPORTED_METHODS = Object.freeze(new Set(/** @type {const} */ ([GET, POST, DELETE])));
|
|
8
|
+
|
|
9
|
+
const WDA_ROUTES = /** @type {const} */ ({
|
|
10
|
+
'/wda/screen': {
|
|
11
|
+
GET: 'getScreenInfo',
|
|
12
|
+
},
|
|
13
|
+
'/wda/alert/buttons': {
|
|
14
|
+
GET: 'getAlertButtons',
|
|
15
|
+
},
|
|
16
|
+
'/wda/apps/launch': {
|
|
17
|
+
POST: 'mobileLaunchApp',
|
|
18
|
+
},
|
|
19
|
+
'/wda/apps/terminate': {
|
|
20
|
+
POST: 'mobileTerminateApp',
|
|
21
|
+
},
|
|
22
|
+
'/wda/apps/activate': {
|
|
23
|
+
POST: 'mobileActivateApp',
|
|
24
|
+
},
|
|
25
|
+
'/wda/apps/state': {
|
|
26
|
+
POST: 'mobileQueryAppState',
|
|
27
|
+
},
|
|
28
|
+
'/wda/keys': {
|
|
29
|
+
POST: 'keys',
|
|
30
|
+
},
|
|
31
|
+
'/wda/touch_id': {
|
|
32
|
+
POST: 'touchId',
|
|
33
|
+
},
|
|
34
|
+
'/wda/keyboard/dismiss': {
|
|
35
|
+
POST: 'hideKeyboard',
|
|
36
|
+
},
|
|
37
|
+
'/wda/lock': {
|
|
38
|
+
POST: 'lock',
|
|
39
|
+
},
|
|
40
|
+
'/wda/unlock': {
|
|
41
|
+
POST: 'unlock',
|
|
42
|
+
},
|
|
43
|
+
'/wda/locked': {
|
|
44
|
+
GET: 'isLocked',
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Proxies a command to WebDriverAgent
|
|
50
|
+
* @template [TReq=any]
|
|
51
|
+
* @template [TRes=unknown]
|
|
52
|
+
* @param {string} url
|
|
53
|
+
* @param {AllowedHttpMethod} method
|
|
54
|
+
* @param {TReq} [body]
|
|
55
|
+
* @param {boolean} isSessionCommand
|
|
56
|
+
* @this {import('../driver').XCUITestDriver}
|
|
57
|
+
* @returns {Promise<TRes>}
|
|
58
|
+
*/
|
|
59
|
+
export async function proxyCommand(url, method, body, isSessionCommand = true) {
|
|
60
|
+
if (this.shutdownUnexpectedly) {
|
|
61
|
+
return /** @type {TRes} */ (undefined);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if (!url) {
|
|
65
|
+
throw this.log.errorWithException('Proxying requires an endpoint');
|
|
66
|
+
} else if (!SUPPORTED_METHODS.has(method)) {
|
|
67
|
+
throw this.log.errorWithException(
|
|
68
|
+
`Proxying only works for the following HTTP methods: ${[...SUPPORTED_METHODS].join(', ')}`,
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if (!this.wda) {
|
|
73
|
+
throw new Error('Cannot call proxyCommand without WDA driver active');
|
|
74
|
+
}
|
|
75
|
+
const proxy = isSessionCommand ? this.wda.jwproxy : this.wda.noSessionProxy;
|
|
76
|
+
if (!proxy) {
|
|
77
|
+
throw new Error('Cannot call proxyCommand without WDA proxy active');
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
let cmdName = wdaRouteToCommandName(url, method) || routeToCommandName(url, method);
|
|
81
|
+
const timeout = this._getCommandTimeout(cmdName);
|
|
82
|
+
if (!cmdName) {
|
|
83
|
+
// this should never happen except when adding new routes
|
|
84
|
+
cmdName = 'Unknown'; // just for logging purposes below
|
|
85
|
+
this.log.info(`Proxying to WDA with an unknown route: ${method} ${url}`);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if (!timeout) {
|
|
89
|
+
return /** @type {TRes} */ (await proxy.command(url, method, body));
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
this.log.debug(`Setting custom timeout to ${timeout} ms for '${cmdName}' command`);
|
|
93
|
+
try {
|
|
94
|
+
return /** @type {TRes} */ (await B.resolve(proxy.command(url, method, body)).timeout(timeout));
|
|
95
|
+
} catch (e) {
|
|
96
|
+
if (!(e instanceof B.Promise.TimeoutError)) {
|
|
97
|
+
throw e;
|
|
98
|
+
}
|
|
99
|
+
proxy.cancelActiveRequests();
|
|
100
|
+
const error = new errors.TimeoutError(
|
|
101
|
+
`Appium did not get any response from '${cmdName}' command in ${timeout} ms`
|
|
102
|
+
);
|
|
103
|
+
await this.startUnexpectedShutdown(error);
|
|
104
|
+
throw error;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* @param {string} endpoint
|
|
110
|
+
* @param {AllowedHttpMethod} method
|
|
111
|
+
* @returns {string|undefined}
|
|
112
|
+
*/
|
|
113
|
+
function wdaRouteToCommandName(endpoint, method) {
|
|
114
|
+
if (endpoint in WDA_ROUTES) {
|
|
115
|
+
return WDA_ROUTES[endpoint][method];
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* @typedef {import('../driver').XCUITestDriver} XCUITestDriver
|
|
121
|
+
* @typedef {'GET'|'POST'|'DELETE'} AllowedHttpMethod
|
|
122
|
+
*/
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import {fs, tempDir, logger, util} from 'appium/support';
|
|
2
|
+
import {SubProcess} from 'teen_process';
|
|
3
|
+
import {encodeBase64OrUpload} from '../utils';
|
|
4
|
+
import {waitForCondition} from 'asyncbox';
|
|
5
|
+
|
|
6
|
+
const MAX_RECORDING_TIME_SEC = 43200;
|
|
7
|
+
const AUDIO_RECORD_FEAT_NAME = 'audio_record';
|
|
8
|
+
const DEFAULT_SOURCE = 'avfoundation';
|
|
9
|
+
const PROCESS_STARTUP_TIMEOUT_MS = 5000;
|
|
10
|
+
|
|
11
|
+
const DEFAULT_EXT = '.mp4';
|
|
12
|
+
const FFMPEG_BINARY = 'ffmpeg';
|
|
13
|
+
const ffmpegLogger = logger.getLogger(FFMPEG_BINARY);
|
|
14
|
+
|
|
15
|
+
export class AudioRecorder {
|
|
16
|
+
constructor(input, log, audioPath, opts = {}) {
|
|
17
|
+
this.input = input;
|
|
18
|
+
this.log = log;
|
|
19
|
+
this.audioPath = audioPath;
|
|
20
|
+
this.opts = opts;
|
|
21
|
+
this.mainProcess = null;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
async start(timeoutSeconds) {
|
|
25
|
+
try {
|
|
26
|
+
await fs.which(FFMPEG_BINARY);
|
|
27
|
+
} catch {
|
|
28
|
+
throw new Error(
|
|
29
|
+
`'${FFMPEG_BINARY}' binary is not found in PATH. Install it using 'brew install ffmpeg'. ` +
|
|
30
|
+
`Check https://www.ffmpeg.org/download.html for more details.`,
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const {audioSource, audioCodec, audioBitrate, audioChannels, audioRate} = this.opts;
|
|
35
|
+
|
|
36
|
+
const args = [
|
|
37
|
+
'-t',
|
|
38
|
+
`${timeoutSeconds}`,
|
|
39
|
+
'-f',
|
|
40
|
+
audioSource,
|
|
41
|
+
'-i',
|
|
42
|
+
this.input,
|
|
43
|
+
'-c:a',
|
|
44
|
+
audioCodec,
|
|
45
|
+
'-b:a',
|
|
46
|
+
audioBitrate,
|
|
47
|
+
'-ac',
|
|
48
|
+
`${audioChannels}`,
|
|
49
|
+
'-ar',
|
|
50
|
+
`${audioRate}`,
|
|
51
|
+
this.audioPath,
|
|
52
|
+
];
|
|
53
|
+
|
|
54
|
+
this.mainProcess = new SubProcess(FFMPEG_BINARY, args);
|
|
55
|
+
let isCaptureStarted = false;
|
|
56
|
+
this.mainProcess.on('output', (stdout, stderr) => {
|
|
57
|
+
if (stderr) {
|
|
58
|
+
if (stderr.trim().startsWith('size=')) {
|
|
59
|
+
if (!isCaptureStarted) {
|
|
60
|
+
isCaptureStarted = true;
|
|
61
|
+
}
|
|
62
|
+
} else {
|
|
63
|
+
ffmpegLogger.info(`${stderr}`);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
await this.mainProcess.start(0);
|
|
68
|
+
try {
|
|
69
|
+
await waitForCondition(() => isCaptureStarted, {
|
|
70
|
+
waitMs: PROCESS_STARTUP_TIMEOUT_MS,
|
|
71
|
+
intervalMs: 300,
|
|
72
|
+
});
|
|
73
|
+
} catch {
|
|
74
|
+
this.log.warn(
|
|
75
|
+
`Audio recording process did not start within ${PROCESS_STARTUP_TIMEOUT_MS}ms. Continuing anyway`,
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
if (!this.mainProcess.isRunning) {
|
|
79
|
+
this.mainProcess = null;
|
|
80
|
+
throw new Error(
|
|
81
|
+
`The audio recording process '${FFMPEG_BINARY}' died unexpectedly. ` +
|
|
82
|
+
`Check server logs for more details`,
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
this.log.info(
|
|
86
|
+
`Starting capture on audio input '${this.input}' with command: '${util.quote([
|
|
87
|
+
FFMPEG_BINARY,
|
|
88
|
+
...args,
|
|
89
|
+
])}'. ` + `Will timeout in ${timeoutSeconds}s`,
|
|
90
|
+
);
|
|
91
|
+
this.mainProcess.once('exit', (code, signal) => {
|
|
92
|
+
// ffmpeg returns code 255 if SIGINT arrives
|
|
93
|
+
if ([0, 255].includes(code)) {
|
|
94
|
+
this.log.info(`The recording session on audio input '${this.input}' has been finished`);
|
|
95
|
+
} else {
|
|
96
|
+
this.log.debug(
|
|
97
|
+
`The recording session on audio input '${this.input}' has exited ` +
|
|
98
|
+
`with code ${code}, signal ${signal}`,
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
isRecording() {
|
|
105
|
+
return !!this.mainProcess?.isRunning;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
async interrupt(force = false) {
|
|
109
|
+
if (this.isRecording()) {
|
|
110
|
+
const interruptPromise = this.mainProcess?.stop(force ? 'SIGTERM' : 'SIGINT');
|
|
111
|
+
this.mainProcess = null;
|
|
112
|
+
try {
|
|
113
|
+
await interruptPromise;
|
|
114
|
+
} catch (e) {
|
|
115
|
+
this.log.warn(
|
|
116
|
+
`Cannot ${force ? 'terminate' : 'interrupt'} ${FFMPEG_BINARY}. ` +
|
|
117
|
+
`Original error: ${e.message}`,
|
|
118
|
+
);
|
|
119
|
+
return false;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
return true;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
async finish() {
|
|
127
|
+
await this.interrupt();
|
|
128
|
+
return this.audioPath;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
async cleanup() {
|
|
132
|
+
if (await fs.exists(this.audioPath)) {
|
|
133
|
+
await fs.rimraf(this.audioPath);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Records the given hardware audio input and saves it into an `.mp4` file.
|
|
140
|
+
*
|
|
141
|
+
* **To use this command, the `audio_record` security feature must be enabled _and_ [FFMpeg](https://ffmpeg.org/) must be installed on the Appium server.**
|
|
142
|
+
*
|
|
143
|
+
* @param {string|number} audioInput - The name of the corresponding audio input device to use for the capture. The full list of capture devices could be shown by executing `ffmpeg -f avfoundation -list_devices true -i ""`
|
|
144
|
+
* @param {string|number} timeLimit - The maximum recording time, in seconds.
|
|
145
|
+
* @param {string} audioCodec - The name of the audio codec.
|
|
146
|
+
* @param {string} audioBitrate - The bitrate of the resulting audio stream.
|
|
147
|
+
* @param {string|number} audioChannels - The count of audio channels in the resulting stream. Setting it to `1` will create a single channel (mono) audio stream.
|
|
148
|
+
* @param {string|number} audioRate - The sampling rate of the resulting audio stream (in Hz).
|
|
149
|
+
* @param {boolean} forceRestart - Whether to restart audio capture process forcefully when `mobile: startRecordingAudio` is called (`true`) or ignore the call until the current audio recording is completed (`false`).
|
|
150
|
+
* @group Real Device Only
|
|
151
|
+
* @this {XCUITestDriver}
|
|
152
|
+
* @returns {Promise<void>}
|
|
153
|
+
* @privateRemarks Using string literals for the default parameters makes better documentation.
|
|
154
|
+
*/
|
|
155
|
+
export async function startAudioRecording(
|
|
156
|
+
audioInput,
|
|
157
|
+
timeLimit = 180,
|
|
158
|
+
audioCodec = 'aac',
|
|
159
|
+
audioBitrate = '128k',
|
|
160
|
+
audioChannels = 2,
|
|
161
|
+
audioRate = 44100,
|
|
162
|
+
forceRestart = false,
|
|
163
|
+
) {
|
|
164
|
+
if (!this.isFeatureEnabled(AUDIO_RECORD_FEAT_NAME)) {
|
|
165
|
+
throw this.log.errorWithException(
|
|
166
|
+
`Audio capture feature must be enabled on the server side. ` +
|
|
167
|
+
`Please set '--relaxed-security' or '--allow-insecure' with '${AUDIO_RECORD_FEAT_NAME}' option. ` +
|
|
168
|
+
`Read https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/security.md for more details.`,
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
if (!audioInput) {
|
|
172
|
+
throw this.log.errorWithException(
|
|
173
|
+
`The mandatory audioInput option is not provided. Please set it ` +
|
|
174
|
+
`to a correct value (e. g. ':1'). Use 'ffmpeg -f avfoundation -list_devices true -i ""' ` +
|
|
175
|
+
`command to list available input sources`,
|
|
176
|
+
);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
if (this._audioRecorder?.isRecording()) {
|
|
180
|
+
this.log.info(`There is an active audio recording process`);
|
|
181
|
+
if (forceRestart) {
|
|
182
|
+
this.log.info(`Stopping it because 'forceRestart' option is set to true`);
|
|
183
|
+
await this._audioRecorder.interrupt(true);
|
|
184
|
+
} else {
|
|
185
|
+
this.log.info(
|
|
186
|
+
`Doing nothing. ` +
|
|
187
|
+
`Set 'forceRestart' option to true if you'd like to start a new audio recording session`,
|
|
188
|
+
);
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
if (this._audioRecorder) {
|
|
193
|
+
await this._audioRecorder.cleanup();
|
|
194
|
+
this._audioRecorder = null;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
const audioPath = await tempDir.path({
|
|
198
|
+
prefix: `appium_${util.uuidV4().substring(0, 8)}`,
|
|
199
|
+
suffix: DEFAULT_EXT,
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
const audioRecorder = new AudioRecorder(audioInput, this.log, audioPath, {
|
|
203
|
+
audioSource: DEFAULT_SOURCE,
|
|
204
|
+
audioCodec,
|
|
205
|
+
audioBitrate,
|
|
206
|
+
audioChannels,
|
|
207
|
+
audioRate,
|
|
208
|
+
});
|
|
209
|
+
|
|
210
|
+
const timeoutSeconds = parseInt(String(timeLimit), 10);
|
|
211
|
+
if (isNaN(timeoutSeconds) || timeoutSeconds > MAX_RECORDING_TIME_SEC || timeoutSeconds <= 0) {
|
|
212
|
+
throw this.log.errorWithException(
|
|
213
|
+
`The timeLimit value must be in range [1, ${MAX_RECORDING_TIME_SEC}] seconds. ` +
|
|
214
|
+
`The value of '${timeLimit}' has been passed instead.`,
|
|
215
|
+
);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
try {
|
|
219
|
+
await audioRecorder.start(timeoutSeconds);
|
|
220
|
+
} catch (e) {
|
|
221
|
+
await audioRecorder.interrupt(true);
|
|
222
|
+
await audioRecorder.cleanup();
|
|
223
|
+
throw e;
|
|
224
|
+
}
|
|
225
|
+
this._audioRecorder = audioRecorder;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Stop recording of the audio input. If no audio recording process is running then
|
|
230
|
+
* the endpoint will try to get the recently recorded file.
|
|
231
|
+
* If no previously recorded file is found and no active audio recording
|
|
232
|
+
* processes are running then the method returns an empty string.
|
|
233
|
+
*
|
|
234
|
+
* @returns {Promise<string>} Base64-encoded content of the recorded media file or an
|
|
235
|
+
* empty string if no audio recording has been started before.
|
|
236
|
+
* @throws {Error} If there was an error while getting the recorded file.
|
|
237
|
+
* @this {XCUITestDriver}
|
|
238
|
+
*/
|
|
239
|
+
export async function stopAudioRecording() {
|
|
240
|
+
if (!this._audioRecorder) {
|
|
241
|
+
this.log.info('Audio recording has not been started. There is nothing to stop');
|
|
242
|
+
return '';
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
let resultPath;
|
|
246
|
+
try {
|
|
247
|
+
resultPath = await this._audioRecorder.finish();
|
|
248
|
+
if (!(await fs.exists(resultPath))) {
|
|
249
|
+
throw this.log.errorWithException(
|
|
250
|
+
`${FFMPEG_BINARY} has failed ` + `to store the actual audio recording at '${resultPath}'`,
|
|
251
|
+
);
|
|
252
|
+
}
|
|
253
|
+
} catch (e) {
|
|
254
|
+
await this._audioRecorder.interrupt(true);
|
|
255
|
+
await this._audioRecorder.cleanup();
|
|
256
|
+
this._audioRecorder = null;
|
|
257
|
+
throw e;
|
|
258
|
+
}
|
|
259
|
+
return await encodeBase64OrUpload(resultPath);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* @typedef {import('../driver').XCUITestDriver} XCUITestDriver
|
|
264
|
+
*/
|