@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,278 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.createSim = createSim;
|
|
7
|
+
exports.getExistingSim = getExistingSim;
|
|
8
|
+
exports.shutdownSimulator = shutdownSimulator;
|
|
9
|
+
exports.runSimulatorReset = runSimulatorReset;
|
|
10
|
+
exports.installToSimulator = installToSimulator;
|
|
11
|
+
exports.shutdownOtherSimulators = shutdownOtherSimulators;
|
|
12
|
+
exports.setSafariPrefs = setSafariPrefs;
|
|
13
|
+
exports.setLocalizationPrefs = setLocalizationPrefs;
|
|
14
|
+
const appium_ios_simulator_1 = require("@limrun/appium-ios-simulator");
|
|
15
|
+
const node_simctl_1 = require("@limrun/node-simctl");
|
|
16
|
+
const appium_webdriveragent_1 = require("appium-webdriveragent");
|
|
17
|
+
const lodash_1 = __importDefault(require("lodash"));
|
|
18
|
+
const support_1 = require("appium/support");
|
|
19
|
+
const utils_1 = require("./utils");
|
|
20
|
+
const app_utils_1 = require("./app-utils");
|
|
21
|
+
const APPIUM_SIM_PREFIX = 'appiumTest';
|
|
22
|
+
/**
|
|
23
|
+
* Create a new simulator with `appiumTest-` prefix and return the object.
|
|
24
|
+
*
|
|
25
|
+
* @this {import('./driver').XCUITestDriver}
|
|
26
|
+
* @returns {Promise<object>} Simulator object associated with the udid passed in.
|
|
27
|
+
*/
|
|
28
|
+
async function createSim() {
|
|
29
|
+
const { simulatorDevicesSetPath: devicesSetPath, deviceName, platformVersion } = this.opts;
|
|
30
|
+
const platform = (0, utils_1.normalizePlatformName)(this.opts.platformName);
|
|
31
|
+
const simctl = new node_simctl_1.Simctl({ devicesSetPath });
|
|
32
|
+
if (!deviceName) {
|
|
33
|
+
let deviceNames = 'none';
|
|
34
|
+
try {
|
|
35
|
+
deviceNames = (await simctl
|
|
36
|
+
.getDevices(platformVersion, platform))
|
|
37
|
+
.map(({ deviceName }) => deviceName);
|
|
38
|
+
}
|
|
39
|
+
catch { }
|
|
40
|
+
throw new Error(`'deviceName' must be provided in order to create a new Simulator for ${platform} platform. ` +
|
|
41
|
+
`Currently available device names: ${deviceNames}`);
|
|
42
|
+
}
|
|
43
|
+
if (!platformVersion) {
|
|
44
|
+
throw new Error(`'platformVersion' is required.`);
|
|
45
|
+
}
|
|
46
|
+
const simName = `${APPIUM_SIM_PREFIX}-${support_1.util.uuidV4().toUpperCase()}-${deviceName}`;
|
|
47
|
+
this.log.debug(`Creating a temporary Simulator device '${simName}'`);
|
|
48
|
+
const udid = await simctl.createDevice(simName, deviceName, platformVersion, { platform });
|
|
49
|
+
return await (0, appium_ios_simulator_1.getSimulator)(udid, {
|
|
50
|
+
platform,
|
|
51
|
+
checkExistence: false,
|
|
52
|
+
devicesSetPath,
|
|
53
|
+
// @ts-ignore This is ok
|
|
54
|
+
logger: this.log,
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* @typedef {Object} SimulatorLookupOptions
|
|
59
|
+
* @property {string} [deviceName] - The name of the device to lookup
|
|
60
|
+
* @property {string} platformVersion - The platform version string
|
|
61
|
+
* @property {string} [simulatorDevicesSetPath] - The full path to the simulator devices set
|
|
62
|
+
* @property {string} [udid] - Simulator udid
|
|
63
|
+
* @property {string} [platformName] The name of the current platform
|
|
64
|
+
*/
|
|
65
|
+
/**
|
|
66
|
+
* Get an existing simulator matching the provided capabilities.
|
|
67
|
+
*
|
|
68
|
+
* @this {import('./driver').XCUITestDriver}
|
|
69
|
+
* @returns {Promise<import('./driver').Simulator|null>} The matched Simulator instance or `null` if no matching device is found.
|
|
70
|
+
*/
|
|
71
|
+
async function getExistingSim() {
|
|
72
|
+
const { platformVersion, deviceName, udid, simulatorDevicesSetPath: devicesSetPath, platformName, } = this.opts;
|
|
73
|
+
const platform = (0, utils_1.normalizePlatformName)(platformName);
|
|
74
|
+
const selectSim = async (/** @type {{ udid: string; platform: string; }} */ dev) => await (0, appium_ios_simulator_1.getSimulator)(dev.udid, {
|
|
75
|
+
platform,
|
|
76
|
+
checkExistence: false,
|
|
77
|
+
devicesSetPath,
|
|
78
|
+
// @ts-ignore This is ok
|
|
79
|
+
logger: this.log,
|
|
80
|
+
});
|
|
81
|
+
const simctl = new node_simctl_1.Simctl({ devicesSetPath });
|
|
82
|
+
let devicesMap;
|
|
83
|
+
if (udid && lodash_1.default.toLower(udid) !== utils_1.UDID_AUTO) {
|
|
84
|
+
this.log.debug(`Looking for an existing Simulator with UDID '${udid}'`);
|
|
85
|
+
devicesMap = await simctl.getDevices(null, platform);
|
|
86
|
+
for (const device of lodash_1.default.flatMap(lodash_1.default.values(devicesMap))) {
|
|
87
|
+
if (device.udid === udid) {
|
|
88
|
+
return await selectSim(device);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return null;
|
|
92
|
+
}
|
|
93
|
+
if (!platformVersion) {
|
|
94
|
+
this.log.debug(`Provide 'platformVersion' capability if you prefer an existing Simulator to be selected`);
|
|
95
|
+
return null;
|
|
96
|
+
}
|
|
97
|
+
const devices = devicesMap?.[platformVersion] ?? (await simctl.getDevices(platformVersion, platform));
|
|
98
|
+
this.log.debug(`Looking for an existing Simulator with platformName: ${platform}, ` +
|
|
99
|
+
`platformVersion: ${platformVersion}, deviceName: ${deviceName}`);
|
|
100
|
+
for (const device of devices) {
|
|
101
|
+
if ((deviceName && device.name === deviceName) || !deviceName) {
|
|
102
|
+
if (!deviceName) {
|
|
103
|
+
this.log.debug(`The 'deviceName' capability value is empty. ` +
|
|
104
|
+
`Selecting the first matching device '${device.name}' having the ` +
|
|
105
|
+
`'platformVersion' set to ${platformVersion}`);
|
|
106
|
+
}
|
|
107
|
+
return await selectSim(device);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* @this {import('./driver').XCUITestDriver}
|
|
114
|
+
*/
|
|
115
|
+
async function shutdownSimulator() {
|
|
116
|
+
const device = /** @type {import('./driver').Simulator} */ (this.device);
|
|
117
|
+
// stop XCTest processes if running to avoid unexpected side effects
|
|
118
|
+
await (0, appium_webdriveragent_1.resetTestProcesses)(device.udid, true);
|
|
119
|
+
await device.shutdown();
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* @this {import('./driver').XCUITestDriver}
|
|
123
|
+
* @property {boolean} [enforceSimulatorShutdown=false]
|
|
124
|
+
* @returns {Promise<void>}
|
|
125
|
+
*/
|
|
126
|
+
async function runSimulatorReset(enforceSimulatorShutdown = false) {
|
|
127
|
+
const { noReset, fullReset, keychainsExcludePatterns, keepKeyChains, bundleId, app, browserName, } = this.opts;
|
|
128
|
+
if (noReset && !fullReset) {
|
|
129
|
+
// noReset === true && fullReset === false
|
|
130
|
+
this.log.debug('Reset: noReset is on. Leaving simulator as is');
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
const device = /** @type {import('./driver').Simulator} */ (this.device);
|
|
134
|
+
if (!this.device) {
|
|
135
|
+
this.log.debug('Reset: no device available. Skipping');
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
if (fullReset) {
|
|
139
|
+
this.log.debug('Reset: fullReset is on. Cleaning simulator');
|
|
140
|
+
await shutdownSimulator.bind(this)();
|
|
141
|
+
const isKeychainsBackupSuccessful = (keychainsExcludePatterns || keepKeyChains) && (await device.backupKeychains());
|
|
142
|
+
await device.clean();
|
|
143
|
+
if (isKeychainsBackupSuccessful) {
|
|
144
|
+
await device.restoreKeychains(keychainsExcludePatterns || []);
|
|
145
|
+
this.log.info(`Successfully restored keychains after full reset`);
|
|
146
|
+
}
|
|
147
|
+
else if (keychainsExcludePatterns || keepKeyChains) {
|
|
148
|
+
this.log.warn('Cannot restore keychains after full reset, because ' +
|
|
149
|
+
'the backup operation did not succeed');
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
else if (bundleId) {
|
|
153
|
+
// fastReset or noReset
|
|
154
|
+
// Terminate the app under test if it is still running on Simulator
|
|
155
|
+
try {
|
|
156
|
+
await device.terminateApp(bundleId);
|
|
157
|
+
}
|
|
158
|
+
catch {
|
|
159
|
+
this.log.warn(`Reset: failed to terminate Simulator application with id "${bundleId}"`);
|
|
160
|
+
}
|
|
161
|
+
if (app) {
|
|
162
|
+
this.log.info('Not scrubbing third party app in anticipation of uninstall');
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
const isSafari = lodash_1.default.toLower(browserName) === 'safari';
|
|
166
|
+
try {
|
|
167
|
+
if (isSafari) {
|
|
168
|
+
await device.scrubSafari(true);
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
await device.scrubApp(bundleId);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
catch (err) {
|
|
175
|
+
this.log.debug(err.stack);
|
|
176
|
+
this.log.warn(err.message);
|
|
177
|
+
this.log.warn(`Reset: could not scrub ${isSafari ? 'Safari browser' : 'application with id "' + this.opts.bundleId + '"'}. ` + `Leaving as is.`);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
if (enforceSimulatorShutdown && (await device.isRunning())) {
|
|
181
|
+
await shutdownSimulator.bind(this)(device);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* @typedef {Object} InstallOptions
|
|
187
|
+
*
|
|
188
|
+
* @property {boolean} [skipUninstall] Whether to skip app uninstall before installing it
|
|
189
|
+
* @property {boolean} [newSimulator=false] Whether the simulator is brand new
|
|
190
|
+
*/
|
|
191
|
+
/**
|
|
192
|
+
* @this {import('./driver').XCUITestDriver}
|
|
193
|
+
* @param {string} app The app to the path
|
|
194
|
+
* @param {string} [bundleId] The bundle id to ensure it is already installed and uninstall it
|
|
195
|
+
* @param {InstallOptions} [opts={}]
|
|
196
|
+
*/
|
|
197
|
+
async function installToSimulator(app, bundleId, opts = {}) {
|
|
198
|
+
if (!app) {
|
|
199
|
+
this.log.debug('No app path is given. Nothing to install.');
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
const { skipUninstall, newSimulator = false } = opts;
|
|
203
|
+
const device = /** @type {import('./driver').Simulator} */ (this.device);
|
|
204
|
+
if (!skipUninstall && !newSimulator && bundleId && (await device.isAppInstalled(bundleId))) {
|
|
205
|
+
this.log.debug(`Reset requested. Removing app with id '${bundleId}' from the device`);
|
|
206
|
+
await device.removeApp(bundleId);
|
|
207
|
+
}
|
|
208
|
+
this.log.debug(`Installing '${app}' on Simulator with UUID '${device.udid}'...`);
|
|
209
|
+
const timer = new support_1.timing.Timer().start();
|
|
210
|
+
await device.installApp(app);
|
|
211
|
+
this.log.info(`The app has been successfully installed in ${timer.getDuration().asMilliSeconds.toFixed(0)}ms`);
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* @this {import('./driver').XCUITestDriver}
|
|
215
|
+
*/
|
|
216
|
+
async function shutdownOtherSimulators() {
|
|
217
|
+
const device = /** @type {import('./driver').Simulator} */ (this.device);
|
|
218
|
+
const simctl = new node_simctl_1.Simctl({
|
|
219
|
+
devicesSetPath: device.devicesSetPath,
|
|
220
|
+
});
|
|
221
|
+
const allDevices = lodash_1.default.flatMap(lodash_1.default.values(await simctl.getDevices()));
|
|
222
|
+
const otherBootedDevices = allDevices
|
|
223
|
+
.filter(({ udid, state }) => udid !== device.udid && state === 'Booted');
|
|
224
|
+
if (lodash_1.default.isEmpty(otherBootedDevices)) {
|
|
225
|
+
this.log.info('No other running simulators have been detected');
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
this.log.info(`Detected ${support_1.util.pluralize('other running Simulator', otherBootedDevices.length, true)}. Shutting them down...`);
|
|
229
|
+
for (const { udid } of otherBootedDevices) {
|
|
230
|
+
// It is necessary to stop the corresponding xcodebuild process before killing
|
|
231
|
+
// the simulator, otherwise it will be automatically restarted
|
|
232
|
+
await (0, appium_webdriveragent_1.resetTestProcesses)(udid, true);
|
|
233
|
+
simctl.udid = udid;
|
|
234
|
+
await simctl.shutdownDevice();
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Configures Safari options based on the given session capabilities
|
|
239
|
+
*
|
|
240
|
+
* @this {import('./driver').XCUITestDriver}
|
|
241
|
+
* @return {Promise<boolean>} true if any preferences have been updated
|
|
242
|
+
*/
|
|
243
|
+
async function setSafariPrefs() {
|
|
244
|
+
const prefs = (0, app_utils_1.buildSafariPreferences)(this.opts);
|
|
245
|
+
if (lodash_1.default.isEmpty(prefs)) {
|
|
246
|
+
return false;
|
|
247
|
+
}
|
|
248
|
+
this.log.debug(`About to update Safari preferences: ${JSON.stringify(prefs)}`);
|
|
249
|
+
await /** @type {import('./driver').Simulator} */ (this.device).updateSafariSettings(prefs);
|
|
250
|
+
return true;
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Changes Simulator localization preferences
|
|
254
|
+
*
|
|
255
|
+
* @this {import('./driver').XCUITestDriver}
|
|
256
|
+
* @returns {Promise<boolean>} True if preferences were changed
|
|
257
|
+
*/
|
|
258
|
+
async function setLocalizationPrefs() {
|
|
259
|
+
const { language, locale, calendarFormat, skipSyncUiDialogTranslation } = this.opts;
|
|
260
|
+
/** @type {import('@limrun/appium-ios-simulator').LocalizationOptions} */
|
|
261
|
+
const l10nConfig = {};
|
|
262
|
+
if (language) {
|
|
263
|
+
l10nConfig.language = { name: language, skipSyncUiDialogTranslation };
|
|
264
|
+
}
|
|
265
|
+
if (locale) {
|
|
266
|
+
l10nConfig.locale = { name: locale };
|
|
267
|
+
if (calendarFormat) {
|
|
268
|
+
l10nConfig.locale.calendar = calendarFormat;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
if (lodash_1.default.isEmpty(l10nConfig)) {
|
|
272
|
+
return false;
|
|
273
|
+
}
|
|
274
|
+
this.log.debug(`About to update localization preferences: ${JSON.stringify(l10nConfig)}`);
|
|
275
|
+
await /** @type {import('./driver').Simulator} */ (this.device).configureLocalization(l10nConfig);
|
|
276
|
+
return true;
|
|
277
|
+
}
|
|
278
|
+
//# sourceMappingURL=simulator-management.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simulator-management.js","sourceRoot":"","sources":["../../lib/simulator-management.js"],"names":[],"mappings":";;;;;AAgBA,8BA+BC;AAiBD,wCA0DC;AAKD,8CAKC;AAOD,8CAuEC;AAeD,gDAsBC;AAKD,0DA0BC;AAQD,wCASC;AAQD,oDAoBC;AAnUD,uEAA0D;AAC1D,qDAA2C;AAC3C,iEAAyD;AACzD,oDAAuB;AACvB,4CAA4C;AAC5C,mCAAyD;AACzD,2CAAmD;AAEnD,MAAM,iBAAiB,GAAG,YAAY,CAAC;AAEvC;;;;;GAKG;AACI,KAAK,UAAU,SAAS;IAC7B,MAAM,EAAC,uBAAuB,EAAE,cAAc,EAAE,UAAU,EAAE,eAAe,EAAC,GAAG,IAAI,CAAC,IAAI,CA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MAAM,GAAG,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;QACnC,IAAI,cAAc,EAAE,CAAC;YACnB,UAAU,CAAC,MAAM,CAAC,QAAQ,GAAG,cAAc,CAAC;QAC9C,CAAC;IACH,CAAC;IACD,IAAI,gBAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;QAC1B,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,6CAA6C,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;IAC1F,MAAM,2CAA2C,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;IAClG,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stubs.d.ts","sourceRoot":"","sources":["../../lib/stubs.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stubs.js","sourceRoot":"","sources":["../../lib/stubs.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export interface Page {
|
|
2
|
+
id: number | string;
|
|
3
|
+
isKey?: boolean;
|
|
4
|
+
url: string;
|
|
5
|
+
}
|
|
6
|
+
export interface AsyncPromise {
|
|
7
|
+
resolve: (value: any) => void;
|
|
8
|
+
reject: (reason: any) => void;
|
|
9
|
+
}
|
|
10
|
+
export interface LifecycleData {
|
|
11
|
+
createSim?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface CalibrationData {
|
|
14
|
+
/**
|
|
15
|
+
* webview x offset in real coordinates
|
|
16
|
+
*/
|
|
17
|
+
offsetX: number;
|
|
18
|
+
/**
|
|
19
|
+
* webview y offset in real coordinates
|
|
20
|
+
*/
|
|
21
|
+
offsetY: number;
|
|
22
|
+
/**
|
|
23
|
+
* pixel ratio x inside of the web view
|
|
24
|
+
*/
|
|
25
|
+
pixelRatioX: number;
|
|
26
|
+
/**
|
|
27
|
+
* pixel ratio y inside of the web view
|
|
28
|
+
*/
|
|
29
|
+
pixelRatioY: number;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../lib/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IAC9B,MAAM,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;CAC/B;AAED,MAAM,WAAW,aAAa;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../lib/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stops and removes all web socket handlers that are listening
|
|
3
|
+
* in scope of the current session.
|
|
4
|
+
*
|
|
5
|
+
* @this {XCUITestDriver}
|
|
6
|
+
* @returns {Promise<void>}
|
|
7
|
+
*/
|
|
8
|
+
export function removeAllSessionWebSocketHandlers(this: import("./driver").XCUITestDriver): Promise<void>;
|
|
9
|
+
/**
|
|
10
|
+
* Asserts that the given driver is running on a Simulator and return
|
|
11
|
+
* the simlator instance.
|
|
12
|
+
*
|
|
13
|
+
* @param {string} action - Description of action
|
|
14
|
+
* @param {import('./driver').XCUITestDriver} driver
|
|
15
|
+
* @returns {Simulator}
|
|
16
|
+
*/
|
|
17
|
+
export function assertSimulator(action: string, driver: import("./driver").XCUITestDriver): Simulator;
|
|
18
|
+
/**
|
|
19
|
+
* Check if platform name is the TV OS one.
|
|
20
|
+
*
|
|
21
|
+
* @param {string|null|undefined} platformName
|
|
22
|
+
* @returns {boolean}
|
|
23
|
+
*/
|
|
24
|
+
export function isTvOs(platformName: string | null | undefined): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Return normalized platform name.
|
|
27
|
+
*
|
|
28
|
+
* @param {string|null|undefined} platformName
|
|
29
|
+
* @returns {string}
|
|
30
|
+
*/
|
|
31
|
+
export function normalizePlatformName(platformName: string | null | undefined): string;
|
|
32
|
+
/**
|
|
33
|
+
* @param {import('./driver').XCUITestDriverOpts} opts
|
|
34
|
+
* @returns {boolean}
|
|
35
|
+
*/
|
|
36
|
+
export function shouldSetInitialSafariUrl(opts: import("./driver").XCUITestDriverOpts): boolean;
|
|
37
|
+
/**
|
|
38
|
+
* @param {import('./driver').XCUITestDriverOpts} opts
|
|
39
|
+
* @returns {boolean}
|
|
40
|
+
*/
|
|
41
|
+
export function isIos17OrNewer(opts: import("./driver").XCUITestDriverOpts): boolean;
|
|
42
|
+
/**
|
|
43
|
+
* @param {import('./driver').XCUITestDriverOpts} opts
|
|
44
|
+
* @returns {boolean}
|
|
45
|
+
*/
|
|
46
|
+
export function isIos18OrNewer(opts: import("./driver").XCUITestDriverOpts): boolean;
|
|
47
|
+
export const UDID_AUTO: "auto";
|
|
48
|
+
export const NATIVE_WIN: "NATIVE_APP";
|
|
49
|
+
export type UploadOptions = {
|
|
50
|
+
/**
|
|
51
|
+
* - The name of the user for the remote authentication. Only works if `remotePath` is provided.
|
|
52
|
+
*/
|
|
53
|
+
user?: string | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* - The password for the remote authentication. Only works if `remotePath` is provided.
|
|
56
|
+
*/
|
|
57
|
+
pass?: string | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* - The http multipart upload method name. The 'PUT' one is used by default.
|
|
60
|
+
* Only works if `remotePath` is provided.
|
|
61
|
+
*/
|
|
62
|
+
method?: import("axios").Method | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* - Additional headers mapping for multipart http(s) uploads
|
|
65
|
+
*/
|
|
66
|
+
headers?: import("@appium/types").HTTPHeaders | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* [file] - The name of the form field, where the file content BLOB should be stored for
|
|
69
|
+
* http(s) uploads
|
|
70
|
+
*/
|
|
71
|
+
fileFieldName?: string | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* - Additional form fields for multipart http(s) uploads
|
|
74
|
+
*/
|
|
75
|
+
formFields?: [string, any][] | Record<string, any> | undefined;
|
|
76
|
+
};
|
|
77
|
+
export type DriverInfo = {
|
|
78
|
+
/**
|
|
79
|
+
* Driver version string
|
|
80
|
+
*/
|
|
81
|
+
version: string;
|
|
82
|
+
/**
|
|
83
|
+
* Driver build timestamp
|
|
84
|
+
*/
|
|
85
|
+
built: string;
|
|
86
|
+
};
|
|
87
|
+
export type XcodeVersion = import("@limrun/appium-xcode").XcodeVersion;
|
|
88
|
+
export type Simulator = import("@limrun/appium-ios-simulator").Simulator;
|
|
89
|
+
export type XCUITestDriver = import("./driver").XCUITestDriver;
|
|
90
|
+
/**
|
|
91
|
+
* @privateRemarks Is the minimum version really Xcode 7.3?
|
|
92
|
+
* @returns {Promise<XcodeVersion>}
|
|
93
|
+
*/
|
|
94
|
+
export function getAndCheckXcodeVersion(): Promise<XcodeVersion>;
|
|
95
|
+
/**
|
|
96
|
+
* @returns {Promise<string|null>}
|
|
97
|
+
*/
|
|
98
|
+
export function getAndCheckIosSdkVersion(): Promise<string | null>;
|
|
99
|
+
export function checkAppPresent(app: any): Promise<void>;
|
|
100
|
+
/**
|
|
101
|
+
* @typedef {Object} DriverInfo
|
|
102
|
+
* @property {string} version Driver version string
|
|
103
|
+
* @property {string} built Driver build timestamp
|
|
104
|
+
*/
|
|
105
|
+
/**
|
|
106
|
+
* @returns {DriverInfo}
|
|
107
|
+
*/
|
|
108
|
+
export const getDriverInfo: (() => Promise<{
|
|
109
|
+
built: string;
|
|
110
|
+
version: any;
|
|
111
|
+
}>) & _.MemoizedFunction;
|
|
112
|
+
export function clearSystemFiles(wda: any): Promise<void>;
|
|
113
|
+
/**
|
|
114
|
+
*
|
|
115
|
+
* @param {string} platformVersion
|
|
116
|
+
* @param {string} deviceName
|
|
117
|
+
* @returns {string}
|
|
118
|
+
*/
|
|
119
|
+
export function translateDeviceName(platformVersion: string, deviceName: string): string;
|
|
120
|
+
export function normalizeCommandTimeouts(value: any): any;
|
|
121
|
+
export const DEFAULT_TIMEOUT_KEY: "default";
|
|
122
|
+
export function markSystemFilesForCleanup(wda: any): Promise<void>;
|
|
123
|
+
export function printUser(): Promise<void>;
|
|
124
|
+
/**
|
|
125
|
+
* Get the IDs of processes listening on the particular system port.
|
|
126
|
+
* It is also possible to apply additional filtering based on the
|
|
127
|
+
* process command line.
|
|
128
|
+
*
|
|
129
|
+
* @param {string|number} port - The port number.
|
|
130
|
+
* @param {?Function} filteringFunc - Optional lambda function, which
|
|
131
|
+
* receives command line string of the particular process
|
|
132
|
+
* listening on given port, and is expected to return
|
|
133
|
+
* either true or false to include/exclude the corresponding PID
|
|
134
|
+
* from the resulting array.
|
|
135
|
+
* @returns {Promise<string[]>} - the list of matched process ids.
|
|
136
|
+
*/
|
|
137
|
+
export function getPIDsListeningOnPort(port: string | number, filteringFunc?: Function | null): Promise<string[]>;
|
|
138
|
+
/**
|
|
139
|
+
* @typedef {Object} UploadOptions
|
|
140
|
+
*
|
|
141
|
+
* @property {string} [user] - The name of the user for the remote authentication. Only works if `remotePath` is provided.
|
|
142
|
+
* @property {string} [pass] - The password for the remote authentication. Only works if `remotePath` is provided.
|
|
143
|
+
* @property {import('axios').Method} [method] - The http multipart upload method name. The 'PUT' one is used by default.
|
|
144
|
+
* Only works if `remotePath` is provided.
|
|
145
|
+
* @property {import('@appium/types').HTTPHeaders} [headers] - Additional headers mapping for multipart http(s) uploads
|
|
146
|
+
* @property {string} [fileFieldName] [file] - The name of the form field, where the file content BLOB should be stored for
|
|
147
|
+
* http(s) uploads
|
|
148
|
+
* @property {Record<string, any> | [string, any][]} [formFields] - Additional form fields for multipart http(s) uploads
|
|
149
|
+
*/
|
|
150
|
+
/**
|
|
151
|
+
* Encodes the given local file to base64 and returns the resulting string
|
|
152
|
+
* or uploads it to a remote server using http/https or ftp protocols
|
|
153
|
+
* if `remotePath` is set
|
|
154
|
+
*
|
|
155
|
+
* @param {string} localPath - The path to an existing local file
|
|
156
|
+
* @param {string|null} [remotePath] - The path to the remote location, where
|
|
157
|
+
* this file should be uploaded
|
|
158
|
+
* @param {UploadOptions} uploadOptions - Set of upload options
|
|
159
|
+
* @returns {Promise<string>} Either an empty string if the upload was successful or
|
|
160
|
+
* base64-encoded file representation if `remotePath` is falsy
|
|
161
|
+
*/
|
|
162
|
+
export function encodeBase64OrUpload(localPath: string, remotePath?: string | null, uploadOptions?: UploadOptions): Promise<string>;
|
|
163
|
+
/**
|
|
164
|
+
* Returns true if the urlString is localhost
|
|
165
|
+
* @param {string} urlString
|
|
166
|
+
* @returns {boolean} Return true if the urlString is localhost
|
|
167
|
+
*/
|
|
168
|
+
export function isLocalHost(urlString: string): boolean;
|
|
169
|
+
/**
|
|
170
|
+
* Normalizes platformVersion to a valid iOS version string
|
|
171
|
+
*
|
|
172
|
+
* @param {string} originalVersion - Loose version number, that can be parsed by semver
|
|
173
|
+
* @return {string} iOS version number in <major>.<minor> format
|
|
174
|
+
* @throws {Error} if the version number cannot be parsed
|
|
175
|
+
*/
|
|
176
|
+
export function normalizePlatformVersion(originalVersion: string): string;
|
|
177
|
+
/**
|
|
178
|
+
* @param {string[]} locations
|
|
179
|
+
* @returns {Promise<void>}
|
|
180
|
+
*/
|
|
181
|
+
export function clearLogs(locations: string[]): Promise<void>;
|
|
182
|
+
/**
|
|
183
|
+
* Assert the presence of particular keys in the given object
|
|
184
|
+
*
|
|
185
|
+
* @param {string|Array<string>} argNames one or more key names
|
|
186
|
+
* @param {Object} opts the object to check
|
|
187
|
+
* @returns {Object} the same given object
|
|
188
|
+
*/
|
|
189
|
+
export function requireArgs(argNames: string | Array<string>, opts?: any): any;
|
|
190
|
+
import _ from 'lodash';
|
|
191
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../lib/utils.js"],"names":[],"mappings":"AAmZA;;;;;;GAMG;AACH,4FAFa,OAAO,CAAC,IAAI,CAAC,CAWzB;AAgDD;;;;;;;GAOG;AACH,wCAJW,MAAM,UACN,OAAO,UAAU,EAAE,cAAc,GAC/B,SAAS,CAOrB;AAED;;;;;GAKG;AACH,qCAHW,MAAM,GAAC,IAAI,GAAC,SAAS,GACnB,OAAO,CAInB;AAED;;;;;GAKG;AACH,oDAHW,MAAM,GAAC,IAAI,GAAC,SAAS,GACnB,MAAM,CAIlB;AAED;;;GAGG;AACH,gDAHW,OAAO,UAAU,EAAE,kBAAkB,GACnC,OAAO,CAKnB;AAED;;;GAGG;AACH,qCAHW,OAAO,UAAU,EAAE,kBAAkB,GACnC,OAAO,CAInB;AAED;;;GAGG;AACH,qCAHW,OAAO,UAAU,EAAE,kBAAkB,GACnC,OAAO,CAInB;AA/fD,wBAAyB,MAAM,CAAC;AAQhC,yBAA0B,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aA8OzB,MAAM;;;;WACN,MAAM;;2BA8RP,OAAO,sBAAsB,EAAE,YAAY;wBAC3C,OAAO,8BAA8B,EAAE,SAAS;6BAChD,OAAO,UAAU,EAAE,cAAc;AA7gB9C;;;GAGG;AACH,2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