@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
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "{}"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright JS Foundation and other contributors, https://js.foundation
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# appium-xcuitest-driver
|
|
2
|
+
|
|
3
|
+
[](https://npmjs.org/package/appium-xcuitest-driver)
|
|
4
|
+
[](https://npmjs.org/package/appium-xcuitest-driver)
|
|
5
|
+
|
|
6
|
+
[](https://github.com/appium/appium-xcuitest-driver/actions/workflows/publish.js.yml)
|
|
7
|
+
|
|
8
|
+
This is an [Appium](https://appium.github.io/appium) driver for automating iOS applications on iOS,
|
|
9
|
+
iPadOS, and tvOS.
|
|
10
|
+
|
|
11
|
+
> [!IMPORTANT]
|
|
12
|
+
> Only macOS is supported as the host platform, as it requires Xcode and developer tools.
|
|
13
|
+
|
|
14
|
+
> [!IMPORTANT]
|
|
15
|
+
> Since major version *10.0.0*, this driver is only compatible with Appium 3. Use the `appium driver install xcuitest`
|
|
16
|
+
> command to add it to your distribution.
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
## Documentation
|
|
20
|
+
|
|
21
|
+
The [Documentation](https://appium.github.io/appium-xcuitest-driver) is hosted separately at
|
|
22
|
+
[https://appium.github.io/appium-xcuitest-driver](https://appium.github.io/appium-xcuitest-driver)
|
|
23
|
+
|
|
24
|
+
## Contributing & Development
|
|
25
|
+
|
|
26
|
+
Clone this project from GitHub and run:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npm install
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
To watch changes during the development:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npm run watch
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
To run unit/functional tests:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npm test # unit
|
|
42
|
+
npm run e2e-test # functional
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
There are also a number of environment variables that can be used when running
|
|
46
|
+
the tests locally. These include:
|
|
47
|
+
|
|
48
|
+
* `REAL_DEVICE` - set to anything truthy, makes the tests use real device capabilities
|
|
49
|
+
* `_FORCE_LOGS` - set to `1` to get the log output, not just spec
|
|
50
|
+
* `PLATFORM_VERSION` - change the version to run the tests against (defaults to `9.3`)
|
|
51
|
+
* `XCCONFIG_FILE` - specify where the xcode config file is for a real device run (if
|
|
52
|
+
blank, and running a real device test, it will search for the first file in
|
|
53
|
+
the root directory of the repo with the extension "xcconfig")
|
|
54
|
+
* `UICATALOG_REAL_DEVICE` - path to the real device build of UICatalog, in case
|
|
55
|
+
the npm installed one is not built for real device
|
package/build/index.d.ts
ADDED
package/build/index.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.doctor = exports.XCUITestDriver = void 0;
|
|
37
|
+
const driver_1 = require("./lib/driver");
|
|
38
|
+
Object.defineProperty(exports, "XCUITestDriver", { enumerable: true, get: function () { return driver_1.XCUITestDriver; } });
|
|
39
|
+
exports.doctor = __importStar(require("./lib/doctor/checks"));
|
|
40
|
+
exports.default = driver_1.XCUITestDriver;
|
|
41
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export class AppInfosCache {
|
|
2
|
+
/**
|
|
3
|
+
* @param {import('@appium/types').AppiumLogger} log
|
|
4
|
+
*/
|
|
5
|
+
constructor(log: import("@appium/types").AppiumLogger);
|
|
6
|
+
log: import("@appium/types").AppiumLogger;
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
* @param {string} bundlePath Full path to the .ipa or .app bundle
|
|
10
|
+
* @param {string} propertyName
|
|
11
|
+
* @returns {Promise<any>}
|
|
12
|
+
*/
|
|
13
|
+
extractManifestProperty(bundlePath: string, propertyName: string): Promise<any>;
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @param {string} bundlePath Full path to the .ipa or .app bundle
|
|
17
|
+
* @returns {Promise<string>}
|
|
18
|
+
*/
|
|
19
|
+
extractBundleId(bundlePath: string): Promise<string>;
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* @param {string} bundlePath Full path to the .ipa or .app bundle
|
|
23
|
+
* @returns {Promise<string>}
|
|
24
|
+
*/
|
|
25
|
+
extractBundleVersion(bundlePath: string): Promise<string>;
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @param {string} bundlePath Full path to the .ipa or .app bundle
|
|
29
|
+
* @returns {Promise<string[]>}
|
|
30
|
+
*/
|
|
31
|
+
extractAppPlatforms(bundlePath: string): Promise<string[]>;
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @param {string} bundlePath Full path to the .ipa or .app bundle
|
|
35
|
+
* @returns {Promise<string>}
|
|
36
|
+
*/
|
|
37
|
+
extractExecutableName(bundlePath: string): Promise<string>;
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @param {string} bundlePath Full path to the .ipa or .app bundle
|
|
41
|
+
* @returns {Promise<import('@appium/types').StringRecord>} The payload of the manifest plist
|
|
42
|
+
* @throws {Error} If the given app is not a valid bundle
|
|
43
|
+
*/
|
|
44
|
+
put(bundlePath: string): Promise<import("@appium/types").StringRecord>;
|
|
45
|
+
/**
|
|
46
|
+
* @param {string} ipaPath Fill path to the .ipa bundle
|
|
47
|
+
* @returns {Promise<import('@appium/types').StringRecord>} The payload of the manifest plist
|
|
48
|
+
*/
|
|
49
|
+
_putIpa(ipaPath: string): Promise<import("@appium/types").StringRecord>;
|
|
50
|
+
/**
|
|
51
|
+
* @param {string} appPath Fill path to the .app bundle
|
|
52
|
+
* @returns {Promise<import('@appium/types').StringRecord>} The payload of the manifest plist
|
|
53
|
+
*/
|
|
54
|
+
_putApp(appPath: string): Promise<import("@appium/types").StringRecord>;
|
|
55
|
+
/**
|
|
56
|
+
* @param {string} plistPath Full path to the plist
|
|
57
|
+
* @param {string} bundlePath Full path to .ipa or .app bundle
|
|
58
|
+
* @returns {Promise<any>} The payload of the plist file
|
|
59
|
+
*/
|
|
60
|
+
_readPlist(plistPath: string, bundlePath: string): Promise<any>;
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=app-infos-cache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-infos-cache.d.ts","sourceRoot":"","sources":["../../lib/app-infos-cache.js"],"names":[],"mappings":"AAiBA;IACE;;OAEG;IACH,iBAFW,OAAO,eAAe,EAAE,YAAY,EAI9C;IADC,0CAAc;IAGhB;;;;;OAKG;IACH,oCAJW,MAAM,gBACN,MAAM,GACJ,OAAO,CAAC,GAAG,CAAC,CAMxB;IAED;;;;OAIG;IACH,4BAHW,MAAM,GACJ,OAAO,CAAC,MAAM,CAAC,CAI3B;IAED;;;;OAIG;IACH,iCAHW,MAAM,GACJ,OAAO,CAAC,MAAM,CAAC,CAI3B;IAED;;;;OAIG;IACH,gCAHW,MAAM,GACJ,OAAO,CAAC,MAAM,EAAE,CAAC,CAQ7B;IAED;;;;OAIG;IACH,kCAHW,MAAM,GACJ,OAAO,CAAC,MAAM,CAAC,CAI3B;IAED;;;;;OAKG;IACH,gBAJW,MAAM,GACJ,OAAO,CAAC,OAAO,eAAe,EAAE,YAAY,CAAC,CAOzD;IAED;;;OAGG;IACH,iBAHW,MAAM,GACJ,OAAO,CAAC,OAAO,eAAe,EAAE,YAAY,CAAC,CAyDzD;IAED;;;OAGG;IACH,iBAHW,MAAM,GACJ,OAAO,CAAC,OAAO,eAAe,EAAE,YAAY,CAAC,CAmBzD;IAED;;;;OAIG;IACH,sBAJW,MAAM,cACN,MAAM,GACJ,OAAO,CAAC,GAAG,CAAC,CASxB;CACF"}
|
|
@@ -0,0 +1,180 @@
|
|
|
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.AppInfosCache = void 0;
|
|
7
|
+
const lodash_1 = __importDefault(require("lodash"));
|
|
8
|
+
const path_1 = __importDefault(require("path"));
|
|
9
|
+
const support_1 = require("appium/support");
|
|
10
|
+
const lru_cache_1 = require("lru-cache");
|
|
11
|
+
const bluebird_1 = __importDefault(require("bluebird"));
|
|
12
|
+
/** @type {LRUCache<string, import('@appium/types').StringRecord>} */
|
|
13
|
+
const MANIFEST_CACHE = new lru_cache_1.LRUCache({
|
|
14
|
+
max: 40,
|
|
15
|
+
updateAgeOnHas: true,
|
|
16
|
+
});
|
|
17
|
+
const MANIFEST_FILE_NAME = 'Info.plist';
|
|
18
|
+
const IPA_ROOT_PLIST_PATH_PATTERN = new RegExp(`^Payload/[^/]+\\.app/${lodash_1.default.escapeRegExp(MANIFEST_FILE_NAME)}$`);
|
|
19
|
+
const MAX_MANIFEST_SIZE = 1024 * 1024; // 1 MiB
|
|
20
|
+
class AppInfosCache {
|
|
21
|
+
/**
|
|
22
|
+
* @param {import('@appium/types').AppiumLogger} log
|
|
23
|
+
*/
|
|
24
|
+
constructor(log) {
|
|
25
|
+
this.log = log;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
* @param {string} bundlePath Full path to the .ipa or .app bundle
|
|
30
|
+
* @param {string} propertyName
|
|
31
|
+
* @returns {Promise<any>}
|
|
32
|
+
*/
|
|
33
|
+
async extractManifestProperty(bundlePath, propertyName) {
|
|
34
|
+
const result = (await this.put(bundlePath))[propertyName];
|
|
35
|
+
this.log.debug(`${propertyName}: ${JSON.stringify(result)}`);
|
|
36
|
+
return result;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @param {string} bundlePath Full path to the .ipa or .app bundle
|
|
41
|
+
* @returns {Promise<string>}
|
|
42
|
+
*/
|
|
43
|
+
async extractBundleId(bundlePath) {
|
|
44
|
+
return await this.extractManifestProperty(bundlePath, 'CFBundleIdentifier');
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @param {string} bundlePath Full path to the .ipa or .app bundle
|
|
49
|
+
* @returns {Promise<string>}
|
|
50
|
+
*/
|
|
51
|
+
async extractBundleVersion(bundlePath) {
|
|
52
|
+
return await this.extractManifestProperty(bundlePath, 'CFBundleVersion');
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @param {string} bundlePath Full path to the .ipa or .app bundle
|
|
57
|
+
* @returns {Promise<string[]>}
|
|
58
|
+
*/
|
|
59
|
+
async extractAppPlatforms(bundlePath) {
|
|
60
|
+
const result = await this.extractManifestProperty(bundlePath, 'CFBundleSupportedPlatforms');
|
|
61
|
+
if (!Array.isArray(result)) {
|
|
62
|
+
throw new Error(`${path_1.default.basename(bundlePath)}': CFBundleSupportedPlatforms is not a valid list`);
|
|
63
|
+
}
|
|
64
|
+
return result;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* @param {string} bundlePath Full path to the .ipa or .app bundle
|
|
69
|
+
* @returns {Promise<string>}
|
|
70
|
+
*/
|
|
71
|
+
async extractExecutableName(bundlePath) {
|
|
72
|
+
return await this.extractManifestProperty(bundlePath, 'CFBundleExecutable');
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
*
|
|
76
|
+
* @param {string} bundlePath Full path to the .ipa or .app bundle
|
|
77
|
+
* @returns {Promise<import('@appium/types').StringRecord>} The payload of the manifest plist
|
|
78
|
+
* @throws {Error} If the given app is not a valid bundle
|
|
79
|
+
*/
|
|
80
|
+
async put(bundlePath) {
|
|
81
|
+
return (await support_1.fs.stat(bundlePath)).isFile()
|
|
82
|
+
? await this._putIpa(bundlePath)
|
|
83
|
+
: await this._putApp(bundlePath);
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* @param {string} ipaPath Fill path to the .ipa bundle
|
|
87
|
+
* @returns {Promise<import('@appium/types').StringRecord>} The payload of the manifest plist
|
|
88
|
+
*/
|
|
89
|
+
async _putIpa(ipaPath) {
|
|
90
|
+
/** @type {import('@appium/types').StringRecord|undefined} */
|
|
91
|
+
let manifestPayload;
|
|
92
|
+
/** @type {Error|undefined} */
|
|
93
|
+
let lastError;
|
|
94
|
+
try {
|
|
95
|
+
await support_1.zip.readEntries(ipaPath, async ({ entry, extractEntryTo }) => {
|
|
96
|
+
// For a future reference:
|
|
97
|
+
// If the directory name includes `.app` suffix (case insensitive) like 'Payload/something.App.app/filename',
|
|
98
|
+
// then 'entry.fileName' would return 'Payload/something.App/filename'.
|
|
99
|
+
// The behavior is specific for unzip. Technically such naming is possible and valid,
|
|
100
|
+
// although Info.plist retrieval would fail in Appium.
|
|
101
|
+
// https://github.com/appium/appium/issues/20075
|
|
102
|
+
if (!IPA_ROOT_PLIST_PATH_PATTERN.test(entry.fileName)) {
|
|
103
|
+
return true;
|
|
104
|
+
}
|
|
105
|
+
const hash = `${entry.crc32}`;
|
|
106
|
+
if (MANIFEST_CACHE.has(hash)) {
|
|
107
|
+
manifestPayload = MANIFEST_CACHE.get(hash);
|
|
108
|
+
return false;
|
|
109
|
+
}
|
|
110
|
+
const tmpRoot = await support_1.tempDir.openDir();
|
|
111
|
+
try {
|
|
112
|
+
await extractEntryTo(tmpRoot);
|
|
113
|
+
const plistPath = path_1.default.resolve(tmpRoot, entry.fileName);
|
|
114
|
+
manifestPayload = await this._readPlist(plistPath, ipaPath);
|
|
115
|
+
if (lodash_1.default.isPlainObject(manifestPayload) && entry.uncompressedSize <= MAX_MANIFEST_SIZE) {
|
|
116
|
+
this.log.debug(`Caching the manifest '${entry.fileName}' for ${manifestPayload?.CFBundleIdentifier} app ` +
|
|
117
|
+
`from the compressed source using the key '${hash}'`);
|
|
118
|
+
MANIFEST_CACHE.set(hash, manifestPayload);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
catch (e) {
|
|
122
|
+
this.log.debug(e.stack);
|
|
123
|
+
lastError = e;
|
|
124
|
+
}
|
|
125
|
+
finally {
|
|
126
|
+
await support_1.fs.rimraf(tmpRoot);
|
|
127
|
+
}
|
|
128
|
+
return false;
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
catch (e) {
|
|
132
|
+
this.log.debug(e.stack);
|
|
133
|
+
throw new Error(`Cannot find ${MANIFEST_FILE_NAME} in '${ipaPath}'. Is it a valid application bundle?`);
|
|
134
|
+
}
|
|
135
|
+
if (!manifestPayload) {
|
|
136
|
+
let errorMessage = `Cannot extract ${MANIFEST_FILE_NAME} from '${ipaPath}'. Is it a valid application bundle?`;
|
|
137
|
+
if (lastError) {
|
|
138
|
+
errorMessage += ` Original error: ${lastError.message}`;
|
|
139
|
+
}
|
|
140
|
+
throw new Error(errorMessage);
|
|
141
|
+
}
|
|
142
|
+
return manifestPayload;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* @param {string} appPath Fill path to the .app bundle
|
|
146
|
+
* @returns {Promise<import('@appium/types').StringRecord>} The payload of the manifest plist
|
|
147
|
+
*/
|
|
148
|
+
async _putApp(appPath) {
|
|
149
|
+
const manifestPath = path_1.default.join(appPath, MANIFEST_FILE_NAME);
|
|
150
|
+
const hash = await support_1.fs.hash(manifestPath);
|
|
151
|
+
if (MANIFEST_CACHE.has(hash)) {
|
|
152
|
+
return /** @type {import('@appium/types').StringRecord} */ (MANIFEST_CACHE.get(hash));
|
|
153
|
+
}
|
|
154
|
+
const [payload, stat] = await bluebird_1.default.all([
|
|
155
|
+
this._readPlist(manifestPath, appPath),
|
|
156
|
+
support_1.fs.stat(manifestPath),
|
|
157
|
+
]);
|
|
158
|
+
if (stat.size <= MAX_MANIFEST_SIZE && lodash_1.default.isPlainObject(payload)) {
|
|
159
|
+
this.log.debug(`Caching the manifest for ${payload.CFBundleIdentifier} app from a file source using the key '${hash}'`);
|
|
160
|
+
MANIFEST_CACHE.set(hash, payload);
|
|
161
|
+
}
|
|
162
|
+
return payload;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* @param {string} plistPath Full path to the plist
|
|
166
|
+
* @param {string} bundlePath Full path to .ipa or .app bundle
|
|
167
|
+
* @returns {Promise<any>} The payload of the plist file
|
|
168
|
+
*/
|
|
169
|
+
async _readPlist(plistPath, bundlePath) {
|
|
170
|
+
try {
|
|
171
|
+
return await support_1.plist.parsePlistFile(plistPath);
|
|
172
|
+
}
|
|
173
|
+
catch (e) {
|
|
174
|
+
this.log.debug(e.stack);
|
|
175
|
+
throw new Error(`Cannot parse ${MANIFEST_FILE_NAME} of '${bundlePath}'. Is it a valid application bundle?`);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
exports.AppInfosCache = AppInfosCache;
|
|
180
|
+
//# sourceMappingURL=app-infos-cache.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-infos-cache.js","sour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C,SAAS,EAAE,UAAU;QACpC,IAAI,CAAC;YACH,OAAO,MAAM,eAAK,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;QAC/C,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;YACxB,MAAM,IAAI,KAAK,CAAC,gBAAgB,kBAAkB,QAAQ,UAAU,sCAAsC,CAAC,CAAC;QAC9G,CAAC;IACH,CAAC;CACF;AAzKD,sCAyKC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Verify whether the given application is compatible to the
|
|
3
|
+
* platform where it is going to be installed and tested.
|
|
4
|
+
*
|
|
5
|
+
* @this {XCUITestDriver}
|
|
6
|
+
* @returns {Promise<void>}
|
|
7
|
+
* @throws {Error} If bundle architecture does not match the expected device architecture.
|
|
8
|
+
*/
|
|
9
|
+
export function verifyApplicationPlatform(this: import("./driver").XCUITestDriver): Promise<void>;
|
|
10
|
+
/**
|
|
11
|
+
* @typedef {Object} LocalizableStringsOptions
|
|
12
|
+
* @property {string} [app]
|
|
13
|
+
* @property {string} [language='en']
|
|
14
|
+
* @property {string} [localizableStringsDir]
|
|
15
|
+
* @property {string} [stringFile]
|
|
16
|
+
* @property {boolean} [strictMode]
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Extracts string resources from an app
|
|
20
|
+
*
|
|
21
|
+
* @this {XCUITestDriver}
|
|
22
|
+
* @param {LocalizableStringsOptions} opts
|
|
23
|
+
* @returns {Promise<import('@appium/types').StringRecord>}
|
|
24
|
+
*/
|
|
25
|
+
export function parseLocalizableStrings(this: import("./driver").XCUITestDriver, opts?: LocalizableStringsOptions): Promise<import("@appium/types").StringRecord>;
|
|
26
|
+
/**
|
|
27
|
+
* @typedef {Object} UnzipInfo
|
|
28
|
+
* @property {string} rootDir
|
|
29
|
+
* @property {number} archiveSize
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* Unzips a ZIP archive on the local file system.
|
|
33
|
+
*
|
|
34
|
+
* @param {string} archivePath Full path to a .zip archive
|
|
35
|
+
* @returns {Promise<UnzipInfo>} temporary folder root where the archive has been extracted
|
|
36
|
+
*/
|
|
37
|
+
export function unzipFile(archivePath: string): Promise<UnzipInfo>;
|
|
38
|
+
/**
|
|
39
|
+
* Unzips a ZIP archive from a stream.
|
|
40
|
+
* Uses bdstar tool for this purpose.
|
|
41
|
+
* This allows to optimize the time needed to prepare the app under test
|
|
42
|
+
* to MAX(download, unzip) instead of SUM(download, unzip)
|
|
43
|
+
*
|
|
44
|
+
* @param {import('node:stream').Readable} zipStream
|
|
45
|
+
* @returns {Promise<UnzipInfo>}
|
|
46
|
+
*/
|
|
47
|
+
export function unzipStream(zipStream: import("node:stream").Readable): Promise<UnzipInfo>;
|
|
48
|
+
/**
|
|
49
|
+
* Builds Safari preferences object based on the given session capabilities
|
|
50
|
+
*
|
|
51
|
+
* @param {import('./driver').XCUITestDriverOpts} opts
|
|
52
|
+
* @return {Promise<import('@appium/types').StringRecord>}
|
|
53
|
+
*/
|
|
54
|
+
export function buildSafariPreferences(opts: import("./driver").XCUITestDriverOpts): Promise<import("@appium/types").StringRecord>;
|
|
55
|
+
/**
|
|
56
|
+
* The callback invoked by configureApp helper
|
|
57
|
+
* when it is necessary to download the remote application.
|
|
58
|
+
* We assume the remote file could be anythingm, but only
|
|
59
|
+
* .zip and .ipa formats are supported.
|
|
60
|
+
* A .zip archive can contain one or more
|
|
61
|
+
*
|
|
62
|
+
* @this {XCUITestDriver}
|
|
63
|
+
* @param {import('@appium/types').DownloadAppOptions} opts
|
|
64
|
+
* @returns {Promise<string>}
|
|
65
|
+
*/
|
|
66
|
+
export function onDownloadApp(this: import("./driver").XCUITestDriver, { stream, headers }: import("@appium/types").DownloadAppOptions): Promise<string>;
|
|
67
|
+
/**
|
|
68
|
+
* @this {XCUITestDriver}
|
|
69
|
+
* @param {import('@appium/types').PostProcessOptions} opts
|
|
70
|
+
* @returns {Promise<import('@appium/types').PostProcessResult|false>}
|
|
71
|
+
*/
|
|
72
|
+
export function onPostConfigureApp(this: import("./driver").XCUITestDriver, { cachedAppInfo, isUrl, appPath }: import("@appium/types").PostProcessOptions): Promise<import("@appium/types").PostProcessResult | false>;
|
|
73
|
+
export const SAFARI_BUNDLE_ID: "com.apple.mobilesafari";
|
|
74
|
+
export const APP_EXT: ".app";
|
|
75
|
+
export const IPA_EXT: ".ipa";
|
|
76
|
+
export const SUPPORTED_EXTENSIONS: string[];
|
|
77
|
+
export type LocalizableStringsOptions = {
|
|
78
|
+
app?: string | undefined;
|
|
79
|
+
language?: string | undefined;
|
|
80
|
+
localizableStringsDir?: string | undefined;
|
|
81
|
+
stringFile?: string | undefined;
|
|
82
|
+
strictMode?: boolean | undefined;
|
|
83
|
+
};
|
|
84
|
+
export type UnzipInfo = {
|
|
85
|
+
rootDir: string;
|
|
86
|
+
archiveSize: number;
|
|
87
|
+
};
|
|
88
|
+
export type XCUITestDriver = import("./driver").XCUITestDriver;
|
|
89
|
+
//# sourceMappingURL=app-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-utils.d.ts","sourceRoot":"","sources":["../../lib/app-utils.js"],"names":[],"mappings":"AA+BA;;;;;;;GAOG;AACH,oFAHa,OAAO,CAAC,IAAI,CAAC,CAgEzB;AAgBD;;;;;;;GAOG;AAEH;;;;;;GAMG;AACH,wFAHW,yBAAyB,GACvB,OAAO,CAAC,OAAO,eAAe,EAAE,YAAY,CAAC,CA6FzD;AA0BD;;;;GAIG;AAEH;;;;;GAKG;AACH,uCAHW,MAAM,GACJ,OAAO,CAAC,SAAS,CAAC,CAqB9B;AAED;;;;;;;;GAQG;AACH,uCAHW,OAAO,aAAa,EAAE,QAAQ,GAC5B,OAAO,CAAC,SAAS,CAAC,CAoD9B;AAoJD;;;;;GAKG;AACH,6CAHW,OAAO,UAAU,EAAE,kBAAkB,GACpC,OAAO,CAAC,OAAO,eAAe,EAAE,YAAY,CAAC,CAexD;AAyGD;;;;;;;;;;GAUG;AACH,4FAHW,OAAO,eAAe,EAAE,kBAAkB,GACxC,OAAO,CAAC,MAAM,CAAC,CAM3B;AAED;;;;GAIG;AACH,+GAHW,OAAO,eAAe,EAAE,kBAAkB,GACxC,OAAO,CAAC,OAAO,eAAe,EAAE,iBAAiB,GAAC,KAAK,CAAC,CA0DpE;AAtqBD,+BAAgC,wBAAwB,CAAC;AACzD,sBAAuB,MAAM,CAAC;AAC9B,sBAAuB,MAAM,CAAC;AAW9B,4CAAuD;;;;;;;;;aAiOzC,MAAM;iBACN,MAAM;;6BAwcP,OAAO,UAAU,EAAE,cAAc"}
|