@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,359 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Test script for creating lockdown service, starting CoreDeviceProxy, and creating tunnel
|
|
4
|
+
* This script demonstrates the tunnel creation workflow for all connected devices
|
|
5
|
+
*/
|
|
6
|
+
import {logger, node} from 'appium/support.js';
|
|
7
|
+
import _ from 'lodash';
|
|
8
|
+
|
|
9
|
+
import {
|
|
10
|
+
PacketStreamServer,
|
|
11
|
+
TunnelManager,
|
|
12
|
+
createLockdownServiceByUDID,
|
|
13
|
+
createUsbmux,
|
|
14
|
+
startCoreDeviceProxy,
|
|
15
|
+
startTunnelRegistryServer,
|
|
16
|
+
} from 'appium-ios-remotexpc';
|
|
17
|
+
|
|
18
|
+
import {strongbox} from '@appium/strongbox';
|
|
19
|
+
import path from 'path';
|
|
20
|
+
import fs from 'fs';
|
|
21
|
+
|
|
22
|
+
const log = logger.getLogger('TunnelCreation');
|
|
23
|
+
const TUNNEL_REGISTRY_PORT = 'tunnelRegistryPort';
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* TunnelCreator class for managing tunnel creation and related operations
|
|
27
|
+
*/
|
|
28
|
+
class TunnelCreator {
|
|
29
|
+
constructor() {
|
|
30
|
+
this._packetStreamServers = new Map();
|
|
31
|
+
// Default port value, will be updated in main() if --packet-stream-base-port is provided
|
|
32
|
+
this._packetStreamBasePort = 50000;
|
|
33
|
+
// Default port value, will be updated in main() if --tunnel-registry-port is provided
|
|
34
|
+
this._tunnelRegistryPort = 42314;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
get packetStreamBasePort() {
|
|
38
|
+
return this._packetStreamBasePort;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
set packetStreamBasePort(port) {
|
|
42
|
+
this._packetStreamBasePort = port;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
get tunnelRegistryPort() {
|
|
46
|
+
return this._tunnelRegistryPort;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
set tunnelRegistryPort(port) {
|
|
50
|
+
this._tunnelRegistryPort = port;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Update tunnel registry with new tunnel information
|
|
55
|
+
* @type {import('appium-ios-remotexpc').TunnelResult[]} results - Array of tunnel results
|
|
56
|
+
* @returns {Promise<import('appium-ios-remotexpc').TunnelRegistry>} Updated tunnel registry
|
|
57
|
+
*/
|
|
58
|
+
async updateTunnelRegistry(results) {
|
|
59
|
+
const now = Date.now();
|
|
60
|
+
const nowISOString = new Date().toISOString();
|
|
61
|
+
|
|
62
|
+
// Initialize registry if it doesn't exist
|
|
63
|
+
const registry = {
|
|
64
|
+
tunnels: {},
|
|
65
|
+
metadata: {
|
|
66
|
+
lastUpdated: nowISOString,
|
|
67
|
+
totalTunnels: 0,
|
|
68
|
+
activeTunnels: 0,
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
// Update tunnels
|
|
73
|
+
for (const result of results) {
|
|
74
|
+
if (result.success) {
|
|
75
|
+
const udid = result.device.Properties.SerialNumber;
|
|
76
|
+
registry.tunnels[udid] = {
|
|
77
|
+
udid,
|
|
78
|
+
deviceId: result.device.DeviceID,
|
|
79
|
+
address: result.tunnel.Address,
|
|
80
|
+
rsdPort: result.tunnel.RsdPort ?? 0,
|
|
81
|
+
packetStreamPort: result.packetStreamPort,
|
|
82
|
+
connectionType: result.device.Properties.ConnectionType,
|
|
83
|
+
productId: result.device.Properties.ProductID,
|
|
84
|
+
createdAt: registry.tunnels[udid]?.createdAt ?? now,
|
|
85
|
+
lastUpdated: now,
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// Update metadata
|
|
91
|
+
registry.metadata = {
|
|
92
|
+
lastUpdated: nowISOString,
|
|
93
|
+
totalTunnels: Object.keys(registry.tunnels).length,
|
|
94
|
+
activeTunnels: Object.keys(registry.tunnels).length, // Assuming all are active for now
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
return registry;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Setup cleanup handlers for graceful shutdown
|
|
102
|
+
*/
|
|
103
|
+
setupCleanupHandlers() {
|
|
104
|
+
const cleanup = async (signal) => {
|
|
105
|
+
log.warn(`\nReceived ${signal}. Cleaning up...`);
|
|
106
|
+
|
|
107
|
+
// Close all packet stream servers
|
|
108
|
+
if (this._packetStreamServers.size > 0) {
|
|
109
|
+
log.info(`Closing ${this._packetStreamServers.size} packet stream server(s)...`);
|
|
110
|
+
for (const [udid, server] of this._packetStreamServers) {
|
|
111
|
+
try {
|
|
112
|
+
await server.stop();
|
|
113
|
+
log.info(`Closed packet stream server for device ${udid}`);
|
|
114
|
+
} catch (err) {
|
|
115
|
+
log.warn(`Failed to close packet stream server for device ${udid}: ${err}`);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
this._packetStreamServers.clear();
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
log.info('Cleanup completed. Exiting...');
|
|
122
|
+
process.exit(0);
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
// Handle various termination signals
|
|
126
|
+
process.on('SIGINT', () => cleanup('SIGINT (Ctrl+C)'));
|
|
127
|
+
process.on('SIGTERM', () => cleanup('SIGTERM'));
|
|
128
|
+
process.on('SIGHUP', () => cleanup('SIGHUP'));
|
|
129
|
+
|
|
130
|
+
// Handle uncaught exceptions and unhandled rejections
|
|
131
|
+
process.on('uncaughtException', async (error) => {
|
|
132
|
+
log.error('Uncaught Exception:', error);
|
|
133
|
+
await cleanup('Uncaught Exception');
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
process.on('unhandledRejection', async (reason, promise) => {
|
|
137
|
+
log.error('Unhandled Rejection at:', promise, 'reason:', reason);
|
|
138
|
+
await cleanup('Unhandled Rejection');
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Create tunnel for a single device
|
|
144
|
+
* @param {Device} device - Device object
|
|
145
|
+
* @param {import('tls').ConnectionOptions} tlsOptions - TLS options
|
|
146
|
+
* @returns {Promise<import('appium-ios-remotexpc').TunnelResult & { socket?: any; socketInfo?: import('appium-ios-remotexpc').SocketInfo }>} Tunnel result
|
|
147
|
+
*/
|
|
148
|
+
async createTunnelForDevice(device, tlsOptions) {
|
|
149
|
+
const udid = device.Properties.SerialNumber;
|
|
150
|
+
|
|
151
|
+
log.info(`\n--- Processing device: ${udid} ---`);
|
|
152
|
+
log.info(`Device ID: ${device.DeviceID}`);
|
|
153
|
+
log.info(`Connection Type: ${device.Properties.ConnectionType}`);
|
|
154
|
+
log.info(`Product ID: ${device.Properties.ProductID}`);
|
|
155
|
+
|
|
156
|
+
log.info('Creating lockdown service...');
|
|
157
|
+
const {lockdownService, device: lockdownDevice} = await createLockdownServiceByUDID(udid);
|
|
158
|
+
log.info(`Lockdown service created for device: ${lockdownDevice.Properties.SerialNumber}`);
|
|
159
|
+
|
|
160
|
+
log.info('Starting CoreDeviceProxy...');
|
|
161
|
+
const {socket} = await startCoreDeviceProxy(
|
|
162
|
+
lockdownService,
|
|
163
|
+
lockdownDevice.DeviceID,
|
|
164
|
+
lockdownDevice.Properties.SerialNumber,
|
|
165
|
+
tlsOptions,
|
|
166
|
+
);
|
|
167
|
+
log.info('CoreDeviceProxy started successfully');
|
|
168
|
+
|
|
169
|
+
log.info('Creating tunnel...');
|
|
170
|
+
const tunnel = await TunnelManager.getTunnel(socket);
|
|
171
|
+
log.info(`Tunnel created for address: ${tunnel.Address} with RsdPort: ${tunnel.RsdPort}`);
|
|
172
|
+
|
|
173
|
+
let packetStreamPort;
|
|
174
|
+
packetStreamPort = this._packetStreamBasePort++;
|
|
175
|
+
const packetStreamServer = new PacketStreamServer(packetStreamPort);
|
|
176
|
+
await packetStreamServer.start();
|
|
177
|
+
|
|
178
|
+
const consumer = packetStreamServer.getPacketConsumer();
|
|
179
|
+
if (consumer) {
|
|
180
|
+
tunnel.addPacketConsumer(consumer);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
this._packetStreamServers.set(udid, packetStreamServer);
|
|
184
|
+
|
|
185
|
+
log.info(`Packet stream server started on port ${packetStreamPort}`);
|
|
186
|
+
|
|
187
|
+
log.info(`✅ Tunnel creation completed successfully for device: ${udid}`);
|
|
188
|
+
log.info(` Tunnel Address: ${tunnel.Address}`);
|
|
189
|
+
log.info(` Tunnel RsdPort: ${tunnel.RsdPort}`);
|
|
190
|
+
if (packetStreamPort) {
|
|
191
|
+
log.info(` Packet Stream Port: ${packetStreamPort}`);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
if (_.isFunction(socket?.setNoDelay)) {
|
|
195
|
+
socket.setNoDelay(true);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
return {
|
|
199
|
+
device,
|
|
200
|
+
tunnel: {
|
|
201
|
+
Address: tunnel.Address,
|
|
202
|
+
RsdPort: tunnel.RsdPort,
|
|
203
|
+
},
|
|
204
|
+
packetStreamPort,
|
|
205
|
+
success: true,
|
|
206
|
+
socket,
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Sets up tunnels for all connected devices.
|
|
212
|
+
* @param {import('appium-ios-remotexpc').Usbmux} usbmux - The usbmux object.
|
|
213
|
+
* @param {string|undefined} specificUdid - A specific UDID to process, or undefined for all devices.
|
|
214
|
+
* @param {import('tls').ConnectionOptions} tlsOptions - TLS options.
|
|
215
|
+
*/
|
|
216
|
+
async setupTunnels(usbmux, specificUdid, tlsOptions) {
|
|
217
|
+
log.info('Listing all connected devices...');
|
|
218
|
+
const devices = await usbmux.listDevices();
|
|
219
|
+
|
|
220
|
+
if (devices.length === 0) {
|
|
221
|
+
log.warn('No devices found. Make sure iOS devices are connected and trusted.');
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
log.info(`Found ${devices.length} connected device(s):`);
|
|
226
|
+
devices.forEach((device, index) => {
|
|
227
|
+
log.info(` ${index + 1}. UDID: ${device.Properties.SerialNumber}`);
|
|
228
|
+
log.info(` Device ID: ${device.DeviceID}`);
|
|
229
|
+
log.info(` Connection: ${device.Properties.ConnectionType}`);
|
|
230
|
+
log.info(` Product ID: ${device.Properties.ProductID}`);
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
let devicesToProcess = devices;
|
|
234
|
+
if (specificUdid) {
|
|
235
|
+
devicesToProcess = devices.filter(
|
|
236
|
+
(device) => device.Properties.SerialNumber === specificUdid,
|
|
237
|
+
);
|
|
238
|
+
|
|
239
|
+
if (devicesToProcess.length === 0) {
|
|
240
|
+
log.error(`Device with UDID ${specificUdid} not found in connected devices.`);
|
|
241
|
+
log.error('Available devices:');
|
|
242
|
+
devices.forEach((device) => {
|
|
243
|
+
log.error(` - ${device.Properties.SerialNumber}`);
|
|
244
|
+
});
|
|
245
|
+
process.exit(1);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
log.info(`\nProcessing ${devicesToProcess.length} device(s)...`);
|
|
250
|
+
|
|
251
|
+
/** @type {import('appium-ios-remotexpc').TunnelResult[]} */
|
|
252
|
+
const results = [];
|
|
253
|
+
|
|
254
|
+
for (const device of devicesToProcess) {
|
|
255
|
+
const result = await this.createTunnelForDevice(device, tlsOptions);
|
|
256
|
+
results.push(result);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
log.info('\n=== TUNNEL CREATION SUMMARY ===');
|
|
260
|
+
const successful = results.filter((r) => r.success);
|
|
261
|
+
const failed = results.filter((r) => !r.success);
|
|
262
|
+
|
|
263
|
+
log.info(`Total devices processed: ${results.length}`);
|
|
264
|
+
log.info(`Successful tunnels: ${successful.length}`);
|
|
265
|
+
log.info(`Failed tunnels: ${failed.length}`);
|
|
266
|
+
|
|
267
|
+
if (successful.length > 0) {
|
|
268
|
+
log.info('\n✅ Successful tunnels:');
|
|
269
|
+
const registry = await this.updateTunnelRegistry(results);
|
|
270
|
+
await startTunnelRegistryServer(registry, this._tunnelRegistryPort);
|
|
271
|
+
|
|
272
|
+
log.info('\n📁 Tunnel registry API:');
|
|
273
|
+
log.info(' The tunnel registry is now available through the API at:');
|
|
274
|
+
log.info(` http://localhost:${this._tunnelRegistryPort}/remotexpc/tunnels`);
|
|
275
|
+
log.info('\n Available endpoints:');
|
|
276
|
+
log.info(' - GET /remotexpc/tunnels - List all tunnels');
|
|
277
|
+
log.info(' - GET /remotexpc/tunnels/:udid - Get tunnel by UDID');
|
|
278
|
+
log.info(' - GET /remotexpc/tunnels/metadata - Get registry metadata');
|
|
279
|
+
if (successful.length > 0) {
|
|
280
|
+
const firstUdid = successful[0].device.Properties.SerialNumber;
|
|
281
|
+
log.info(` curl http://localhost:4723/remotexpc/tunnels/${firstUdid}`);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Helper function to parse string arguments
|
|
289
|
+
* @param {string[]} args - Array of command line arguments
|
|
290
|
+
* @param {string} flagName - Name of the flag to parse (e.g. '--udid')
|
|
291
|
+
* @returns {string|undefined} The value of the flag if found, undefined otherwise
|
|
292
|
+
*/
|
|
293
|
+
function parseArg(args, flagName) {
|
|
294
|
+
const equalsArg = args.find((arg) => arg.startsWith(`${flagName}=`));
|
|
295
|
+
if (equalsArg) {
|
|
296
|
+
const value = equalsArg.split('=')[1];
|
|
297
|
+
log.info(`Using ${flagName.slice(2)}: ${value}`);
|
|
298
|
+
return value;
|
|
299
|
+
} else {
|
|
300
|
+
const flagIndex = args.indexOf(flagName);
|
|
301
|
+
if (flagIndex !== -1 && flagIndex + 1 < args.length) {
|
|
302
|
+
const value = args[flagIndex + 1];
|
|
303
|
+
log.info(`Using ${flagName.slice(2)}: ${value}`);
|
|
304
|
+
return value;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
return undefined;
|
|
308
|
+
};
|
|
309
|
+
|
|
310
|
+
const BOOTSTRAP_PATH = node.getModuleRootSync('appium-xcuitest-driver', import.meta.url);
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
*/
|
|
314
|
+
async function main() {
|
|
315
|
+
// Create an instance of TunnelCreator
|
|
316
|
+
const tunnelCreator = new TunnelCreator();
|
|
317
|
+
tunnelCreator.setupCleanupHandlers();
|
|
318
|
+
|
|
319
|
+
const args = process.argv.slice(2);
|
|
320
|
+
|
|
321
|
+
const specificUdid = parseArg(args, '--udid');
|
|
322
|
+
|
|
323
|
+
const packetStreamBasePort = parseArg(args, '--packet-stream-base-port');
|
|
324
|
+
if (packetStreamBasePort !== undefined) {
|
|
325
|
+
tunnelCreator.packetStreamBasePort = parseInt(packetStreamBasePort, 10);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
const tunnelRegistryPort = parseArg(args, '--tunnel-registry-port');
|
|
329
|
+
if (tunnelRegistryPort !== undefined) {
|
|
330
|
+
tunnelCreator.tunnelRegistryPort = parseInt(tunnelRegistryPort, 10);
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
const packageInfo = JSON.parse(
|
|
334
|
+
fs.readFileSync(path.join(BOOTSTRAP_PATH, 'package.json'), 'utf8'),
|
|
335
|
+
);
|
|
336
|
+
const box = strongbox(packageInfo.name);
|
|
337
|
+
try {
|
|
338
|
+
await box.createItemWithValue(TUNNEL_REGISTRY_PORT, String(tunnelCreator.tunnelRegistryPort));
|
|
339
|
+
} catch (error) {
|
|
340
|
+
throw new Error(`Tunnel registry port cannot be persisted: ${error.message}`);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/** @type {import('tls').ConnectionOptions} */
|
|
344
|
+
const tlsOptions = {
|
|
345
|
+
rejectUnauthorized: false,
|
|
346
|
+
minVersion: 'TLSv1.2',
|
|
347
|
+
};
|
|
348
|
+
|
|
349
|
+
log.info('Connecting to usbmuxd...');
|
|
350
|
+
const usbmux = await createUsbmux();
|
|
351
|
+
|
|
352
|
+
try {
|
|
353
|
+
await tunnelCreator.setupTunnels(usbmux, specificUdid, tlsOptions);
|
|
354
|
+
} finally {
|
|
355
|
+
await usbmux.close();
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
(async () => await main())();
|
package/scripts/utils.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get the value of the given argument name.
|
|
3
|
+
*
|
|
4
|
+
* @param {string} argName
|
|
5
|
+
* @returns {string?} The value of the given 'argName'.
|
|
6
|
+
*/
|
|
7
|
+
export function parseArgValue(argName) {
|
|
8
|
+
const argNamePattern = new RegExp(`^--${argName}\\b`);
|
|
9
|
+
for (let i = 1; i < process.argv.length; ++i) {
|
|
10
|
+
const arg = process.argv[i];
|
|
11
|
+
if (argNamePattern.test(arg)) {
|
|
12
|
+
return arg.includes('=') ? arg.split('=')[1] : process.argv[i + 1];
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return null;
|
|
16
|
+
}
|