@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,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getAlertText = getAlertText;
|
|
4
|
+
exports.setAlertText = setAlertText;
|
|
5
|
+
exports.postAcceptAlert = postAcceptAlert;
|
|
6
|
+
exports.postDismissAlert = postDismissAlert;
|
|
7
|
+
exports.getAlertButtons = getAlertButtons;
|
|
8
|
+
exports.mobileHandleAlert = mobileHandleAlert;
|
|
9
|
+
/**
|
|
10
|
+
* @this {XCUITestDriver}
|
|
11
|
+
*/
|
|
12
|
+
async function getAlertText() {
|
|
13
|
+
return /** @type {string|null} */ (await this.proxyCommand('/alert/text', 'GET'));
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* @param {string} value
|
|
17
|
+
* @this {XCUITestDriver}
|
|
18
|
+
* @returns {Promise<void>}
|
|
19
|
+
*/
|
|
20
|
+
async function setAlertText(value) {
|
|
21
|
+
await this.proxyCommand('/alert/text', 'POST', { value });
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @param { {buttonLabel?: string} } opts
|
|
25
|
+
* @returns {Promise<void>}
|
|
26
|
+
* @this {XCUITestDriver}
|
|
27
|
+
*/
|
|
28
|
+
async function postAcceptAlert(opts = {}) {
|
|
29
|
+
await this.proxyCommand('/alert/accept', 'POST', toAlertParams(opts));
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @param { {buttonLabel?: string} } opts
|
|
33
|
+
* @returns {Promise<void>}
|
|
34
|
+
* @this {XCUITestDriver}
|
|
35
|
+
*/
|
|
36
|
+
async function postDismissAlert(opts = {}) {
|
|
37
|
+
await this.proxyCommand('/alert/dismiss', 'POST', toAlertParams(opts));
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* @internal
|
|
41
|
+
* @this {XCUITestDriver}
|
|
42
|
+
* @returns {Promise<string[]>} The list of button labels
|
|
43
|
+
*/
|
|
44
|
+
async function getAlertButtons() {
|
|
45
|
+
return /** @type {string[]} */ (await this.proxyCommand('/wda/alert/buttons', 'GET'));
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Tries to apply the given action to the currently visible alert.
|
|
49
|
+
*
|
|
50
|
+
* @param {AlertAction} action - The actual action to apply.
|
|
51
|
+
* @param {string} [buttonLabel] - The name of the button used to perform the chosen alert action. Only makes sense if the action is `accept` or `dismiss`.
|
|
52
|
+
* @returns {Promise<string[]|void>} If `action` is `getButtons`, a list of alert button labelsp; otherwise nothing.
|
|
53
|
+
* @remarks This should really be separate commands.
|
|
54
|
+
* @this {XCUITestDriver}
|
|
55
|
+
*/
|
|
56
|
+
async function mobileHandleAlert(action, buttonLabel) {
|
|
57
|
+
switch (action) {
|
|
58
|
+
case 'accept':
|
|
59
|
+
return await this.postAcceptAlert({ buttonLabel });
|
|
60
|
+
case 'dismiss':
|
|
61
|
+
return await this.postDismissAlert({ buttonLabel });
|
|
62
|
+
case 'getButtons':
|
|
63
|
+
return await this.getAlertButtons();
|
|
64
|
+
default:
|
|
65
|
+
throw new Error(`The 'action' value should be either 'accept', 'dismiss' or 'getButtons'. ` +
|
|
66
|
+
`'${action}' is provided instead.`);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
*
|
|
71
|
+
* @param { {buttonLabel?: string} } opts
|
|
72
|
+
* @returns { {name?: string} }
|
|
73
|
+
*/
|
|
74
|
+
function toAlertParams(opts = {}) {
|
|
75
|
+
const params = {};
|
|
76
|
+
if (opts.buttonLabel) {
|
|
77
|
+
params.name = opts.buttonLabel;
|
|
78
|
+
}
|
|
79
|
+
return params;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* @typedef {'accept'|'dismiss'|'getButtons'} AlertAction
|
|
83
|
+
*/
|
|
84
|
+
/**
|
|
85
|
+
* @typedef {import('../driver').XCUITestDriver} XCUITestDriver
|
|
86
|
+
*/
|
|
87
|
+
//# sourceMappingURL=alert.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert.js","sourceRoot":"","sources":["../../../lib/commands/alert.js"],"names":[],"mappings":";;AAGA,oCAEC;AAOD,oCAEC;AAOD,0CAEC;AAOD,4CAEC;AAOD,0CAEC;AAWD,8CAcC;AAlED;;GAEG;AACI,KAAK,UAAU,YAAY;IAChC,OAAO,0BAA0B,CAAC,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC,CAAC;AACpF,CAAC;AAED;;;;GAIG;AACI,KAAK,UAAU,YAAY,CAAC,KAAK;IACtC,MAAM,IAAI,CAAC,YAAY,CAAC,aAAa,EAAE,MAAM,EAAE,EAAC,KAAK,EAAC,CAAC,CAAC;AAC1D,CAAC;AAED;;;;GAIG;AACI,KAAK,UAAU,eAAe,CAAC,IAAI,GAAG,EAAE;IAC7C,MAAM,IAAI,CAAC,YAAY,CAAC,eAAe,EAAE,MAAM,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC;AACxE,CAAC;AAED;;;;GAIG;AACI,KAAK,UAAU,gBAAgB,CAAC,IAAI,GAAG,EAAE;IAC9C,MAAM,IAAI,CAAC,YAAY,CAAC,gBAAgB,EAAE,MAAM,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC;AACzE,CAAC;AAED;;;;GAIG;AACI,KAAK,UAAU,eAAe;IACnC,OAAO,uBAAuB,CAAC,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC,CAAC;AACxF,CAAC;AAED;;;;;;;;GAQG;AACI,KAAK,UAAU,iBAAiB,CAAC,MAAM,EAAE,WAAW;IACzD,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,QAAQ;YACX,OAAO,MAAM,IAAI,CAAC,eAAe,CAAC,EAAC,WAAW,EAAC,CAAC,CAAC;QACnD,KAAK,SAAS;YACZ,OAAO,MAAM,IAAI,CAAC,gBAAgB,CAAC,EAAC,WAAW,EAAC,CAAC,CAAC;QACpD,KAAK,YAAY;YACf,OAAO,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;QACtC;YACE,MAAM,IAAI,KAAK,CACb,2EAA2E;gBACzE,IAAI,MAAM,wBAAwB,CACrC,CAAC;IACN,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,SAAS,aAAa,CAAC,IAAI,GAAG,EAAE;IAC9B,MAAM,MAAM,GAAG,EAAE,CAAC;IAClB,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;QACrB,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC;IACjC,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;GAEG;AAEH;;GAEG"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Installs the given application to the device under test.
|
|
3
|
+
*
|
|
4
|
+
* Please ensure the app is built for a correct architecture and is signed with a proper developer signature (for real devices) prior to calling this.
|
|
5
|
+
* @param {string} app - See docs for `appium:app` capability
|
|
6
|
+
* @param {number} [timeoutMs] - The maximum time to wait until app install is finished (in ms) on real devices.
|
|
7
|
+
* If not provided, then the value of `appium:appPushTimeout` capability is used. If the capability is not provided then the default is 240000ms (4 minutes).
|
|
8
|
+
* @param {boolean} [checkVersion] - If the application installation follows currently installed application's version status if provided.
|
|
9
|
+
* No checking occurs if no this option.
|
|
10
|
+
* @privateRemarks Link to capability docs
|
|
11
|
+
* @returns {Promise<void>}
|
|
12
|
+
* @this {XCUITestDriver}
|
|
13
|
+
*/
|
|
14
|
+
export function mobileInstallApp(this: import("../driver").XCUITestDriver, app: string, timeoutMs?: number, checkVersion?: boolean): Promise<void>;
|
|
15
|
+
/**
|
|
16
|
+
* Checks whether the given application is installed on the device under test.
|
|
17
|
+
* Offload app is handled as not installed.
|
|
18
|
+
*
|
|
19
|
+
* @param {string} bundleId - The bundle identifier of the application to be checked
|
|
20
|
+
* @returns {Promise<boolean>} `true` if the application is installed; `false` otherwise
|
|
21
|
+
* @this {XCUITestDriver}
|
|
22
|
+
*/
|
|
23
|
+
export function mobileIsAppInstalled(this: import("../driver").XCUITestDriver, bundleId: string): Promise<boolean>;
|
|
24
|
+
/**
|
|
25
|
+
* Removes/uninstalls the given application from the device under test.
|
|
26
|
+
* Offload app data could also be removed.
|
|
27
|
+
*
|
|
28
|
+
* @param {string} bundleId - The bundle identifier of the application to be removed
|
|
29
|
+
* @returns {Promise<boolean>} `true` if the application has been removed successfully; `false` otherwise
|
|
30
|
+
* @this {XCUITestDriver}
|
|
31
|
+
*/
|
|
32
|
+
export function mobileRemoveApp(this: import("../driver").XCUITestDriver, bundleId: string): Promise<boolean>;
|
|
33
|
+
/**
|
|
34
|
+
* Executes the given app on the device under test.
|
|
35
|
+
*
|
|
36
|
+
* If the app is already running it will be activated. If the app is not installed or cannot be launched then an exception is thrown.
|
|
37
|
+
* @param {string} bundleId - The bundle identifier of the application to be launched
|
|
38
|
+
* @param {string|string[]} [args] - One or more command line arguments for the app. If the app is already running then this argument is ignored.
|
|
39
|
+
* @param {object} [environment] - Environment variables mapping for the app. If the app is already running then this argument is ignored.
|
|
40
|
+
* @returns {Promise<void>}
|
|
41
|
+
* @this {XCUITestDriver}
|
|
42
|
+
*/
|
|
43
|
+
export function mobileLaunchApp(this: import("../driver").XCUITestDriver, bundleId: string, args?: string | string[], environment?: object): Promise<void>;
|
|
44
|
+
/**
|
|
45
|
+
* Terminates the given app on the device under test.
|
|
46
|
+
*
|
|
47
|
+
* This command performs termination via [XCTest's `terminate`](https://developer.apple.com/documentation/xctest/xcuiapplication/1500637-terminate) API. If the app is not installed an exception is thrown. If the app is not running then nothing is done.
|
|
48
|
+
* @param {string} bundleId - The bundle identifier of the application to be terminated
|
|
49
|
+
* @returns {Promise<boolean>} `true` if the app has been terminated successfully; `false` otherwise
|
|
50
|
+
* @this {XCUITestDriver}
|
|
51
|
+
*/
|
|
52
|
+
export function mobileTerminateApp(this: import("../driver").XCUITestDriver, bundleId: string): Promise<boolean>;
|
|
53
|
+
/**
|
|
54
|
+
* Activate the given app on the device under test.
|
|
55
|
+
*
|
|
56
|
+
* This pushes the app to the foreground if it is running in the background. An exception is thrown if the app is not install or isn't running. Nothing is done if the app is already in the foreground.
|
|
57
|
+
*
|
|
58
|
+
* @param {string} bundleId - The bundle identifier of the application to be activated
|
|
59
|
+
* @returns {Promise<void>}
|
|
60
|
+
* @this {XCUITestDriver}
|
|
61
|
+
*/
|
|
62
|
+
export function mobileActivateApp(this: import("../driver").XCUITestDriver, bundleId: string): Promise<void>;
|
|
63
|
+
/**
|
|
64
|
+
* Kill the given app on the real device under test by instruments service.
|
|
65
|
+
*
|
|
66
|
+
* If the app is not running or kill failed, then nothing is done.
|
|
67
|
+
*
|
|
68
|
+
* @remarks `appium-xcuitest-driver` v4.4 does not require `py-ios-device` to be installed.
|
|
69
|
+
* @privateRemarks See implementation at https://github.com/YueChen-C/py-ios-device/blob/51f4683c5c3c385a015858ada07a5f1c62d3cf57/ios_device/cli/base.py#L220
|
|
70
|
+
* @see https://github.com/YueChen-C/py-ios-device
|
|
71
|
+
* @param {string} bundleId - The bundle identifier of the application to be killed
|
|
72
|
+
* @returns {Promise<boolean>} `true` if the app has been killed successfully; `false` otherwise
|
|
73
|
+
* @group Real Device Only
|
|
74
|
+
* @this {XCUITestDriver}
|
|
75
|
+
*/
|
|
76
|
+
export function mobileKillApp(this: import("../driver").XCUITestDriver, bundleId: string): Promise<boolean>;
|
|
77
|
+
/**
|
|
78
|
+
* Queries the state of an installed application from the device under test.
|
|
79
|
+
*
|
|
80
|
+
* If the app with the given `bundleId` is not installed, an exception will be thrown.
|
|
81
|
+
*
|
|
82
|
+
* @param {string} bundleId - The bundle identifier of the application to be queried
|
|
83
|
+
* @returns {Promise<AppState>} The actual application state code
|
|
84
|
+
* @see https://developer.apple.com/documentation/xctest/xcuiapplicationstate?language=objc
|
|
85
|
+
* @this {XCUITestDriver}
|
|
86
|
+
*/
|
|
87
|
+
export function mobileQueryAppState(this: import("../driver").XCUITestDriver, bundleId: string): Promise<AppState>;
|
|
88
|
+
/**
|
|
89
|
+
* @param {string} appPath
|
|
90
|
+
* @param {object} opts
|
|
91
|
+
* @this {XCUITestDriver}
|
|
92
|
+
*/
|
|
93
|
+
export function installApp(appPath: string, { timeoutMs, strategy }?: object): Promise<void>;
|
|
94
|
+
/**
|
|
95
|
+
* @param {string} bundleId
|
|
96
|
+
* @param {object} opts
|
|
97
|
+
* @this {XCUITestDriver}
|
|
98
|
+
*/
|
|
99
|
+
export function activateApp(bundleId: string, opts?: object, ...args: any[]): Promise<any>;
|
|
100
|
+
/**
|
|
101
|
+
* @param {string} bundleId
|
|
102
|
+
* @this {XCUITestDriver}
|
|
103
|
+
*/
|
|
104
|
+
export function isAppInstalled(this: import("../driver").XCUITestDriver, bundleId: string): Promise<boolean>;
|
|
105
|
+
/**
|
|
106
|
+
* @param {string} bundleId
|
|
107
|
+
* @this {XCUITestDriver}
|
|
108
|
+
* @returns {Promise<boolean>}
|
|
109
|
+
*/
|
|
110
|
+
export function terminateApp(this: import("../driver").XCUITestDriver, bundleId: string): Promise<boolean>;
|
|
111
|
+
/**
|
|
112
|
+
* @param {string} bundleId
|
|
113
|
+
* @this {XCUITestDriver}
|
|
114
|
+
*/
|
|
115
|
+
export function queryAppState(this: import("../driver").XCUITestDriver, bundleId: string): Promise<import("./enum").AppState>;
|
|
116
|
+
/**
|
|
117
|
+
* List applications installed on the real device under test
|
|
118
|
+
*
|
|
119
|
+
* Read [Pushing/Pulling files](https://appium.io/docs/en/writing-running-appium/ios/ios-xctest-file-movement/) for more details.
|
|
120
|
+
* @param {'User'|'System'} applicationType - The type of applications to list.
|
|
121
|
+
* @returns {Promise<Record<string,any>[]>} A list of apps where each item is a mapping of bundle identifiers to maps of platform-specific app properties.
|
|
122
|
+
* @remarks Having `UIFileSharingEnabled` set to `true` in the return app properties map means this app supports file upload/download in its `documents` container.
|
|
123
|
+
* @group Real Device Only
|
|
124
|
+
*/
|
|
125
|
+
export function mobileListApps(applicationType?: "User" | "System"): Promise<Record<string, any>[]>;
|
|
126
|
+
/**
|
|
127
|
+
* Deletes application data files, so it could start from the clean state next time
|
|
128
|
+
* it is launched.
|
|
129
|
+
* This API only works on a Simulator.
|
|
130
|
+
*
|
|
131
|
+
* @param {string} bundleId Application bundle identifier
|
|
132
|
+
* @this {XCUITestDriver}
|
|
133
|
+
* @returns {Promise<boolean>} true if any files from the app's data container have been deleted
|
|
134
|
+
*/
|
|
135
|
+
export function mobileClearApp(this: import("../driver").XCUITestDriver, bundleId: string): Promise<boolean>;
|
|
136
|
+
/**
|
|
137
|
+
* Close app (simulate device home button). It is possible to restore
|
|
138
|
+
* the app after the timeout or keep it minimized based on the parameter value.
|
|
139
|
+
*
|
|
140
|
+
* @param {number|{timeout: number?}} [seconds]
|
|
141
|
+
* - any positive number of seconds: come back after X seconds
|
|
142
|
+
* - any negative number of seconds or zero: never come back
|
|
143
|
+
* - undefined/null: never come back
|
|
144
|
+
* - {timeout: 5000}: come back after 5 seconds
|
|
145
|
+
* - {timeout: null}, {timeout: -2}: never come back
|
|
146
|
+
* @this {XCUITestDriver}
|
|
147
|
+
*/
|
|
148
|
+
export function background(this: import("../driver").XCUITestDriver, seconds?: number | {
|
|
149
|
+
timeout: number | null;
|
|
150
|
+
}): Promise<unknown>;
|
|
151
|
+
export type XCUITestDriver = import("../driver").XCUITestDriver;
|
|
152
|
+
export type AppState = import("./enum").AppState;
|
|
153
|
+
//# sourceMappingURL=app-management.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-management.d.ts","sourceRoot":"","sources":["../../../lib/commands/app-management.js"],"names":[],"mappings":"AAYA;;;;;;;;;;;;GAYG;AACH,gFATW,MAAM,cACN,MAAM,iBAEN,OAAO,GAGL,OAAO,CAAC,IAAI,CAAC,CA2CzB;AAED;;;;;;;GAOG;AACH,yFAJW,MAAM,GACJ,OAAO,CAAC,OAAO,CAAC,CAO5B;AAED;;;;;;;GAOG;AACH,oFAJW,MAAM,GACJ,OAAO,CAAC,OAAO,CAAC,CAgB5B;AAED;;;;;;;;;GASG;AACH,oFANW,MAAM,SACN,MAAM,GAAC,MAAM,EAAE,gBACf,MAAM,GACJ,OAAO,CAAC,IAAI,CAAC,CAazB;AAED;;;;;;;GAOG;AACH,uFAJW,MAAM,GACJ,OAAO,CAAC,OAAO,CAAC,CAO5B;AAED;;;;;;;;GAQG;AACH,sFAJW,MAAM,GACJ,OAAO,CAAC,IAAI,CAAC,CAKzB;AAED;;;;;;;;;;;;GAYG;AACH,kFALW,MAAM,GACJ,OAAO,CAAC,OAAO,CAAC,CAY5B;AAED;;;;;;;;;GASG;AACH,wFALW,MAAM,GACJ,OAAO,CAAC,QAAQ,CAAC,CAM7B;AAED;;;;GAIG;AACH,oCAJW,MAAM,4BACN,MAAM,iBAMhB;AAED;;;;GAIG;AACH,sCAJW,MAAM,SACN,MAAM,gCAOhB;AAED;;;GAGG;AACH,mFAHW,MAAM,oBAKhB;AAED;;;;GAIG;AACH,iFAJW,MAAM,GAEJ,OAAO,CAAC,OAAO,CAAC,CAI5B;AAED;;;GAGG;AACH,kFAHW,MAAM,sCAKhB;AAED;;;;;;;;GAQG;AACH,iDALW,MAAM,GAAC,QAAQ,GACb,OAAO,CAAC,MAAM,CAAC,MAAM,EAAC,GAAG,CAAC,EAAE,CAAC,CAezC;AAED;;;;;;;;GAQG;AACH,mFAJW,MAAM,GAEJ,OAAO,CAAC,OAAO,CAAC,CA6B5B;AAED;;;;;;;;;;;GAWG;AACH,+EARW,MAAM,GAAC;IAAC,OAAO,EAAE,MAAM,OAAC,CAAA;CAAC,oBAwCnC;6BAGY,OAAO,WAAW,EAAE,cAAc;uBAClC,OAAO,QAAQ,EAAE,QAAQ"}
|
|
@@ -0,0 +1,323 @@
|
|
|
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.mobileInstallApp = mobileInstallApp;
|
|
7
|
+
exports.mobileIsAppInstalled = mobileIsAppInstalled;
|
|
8
|
+
exports.mobileRemoveApp = mobileRemoveApp;
|
|
9
|
+
exports.mobileLaunchApp = mobileLaunchApp;
|
|
10
|
+
exports.mobileTerminateApp = mobileTerminateApp;
|
|
11
|
+
exports.mobileActivateApp = mobileActivateApp;
|
|
12
|
+
exports.mobileKillApp = mobileKillApp;
|
|
13
|
+
exports.mobileQueryAppState = mobileQueryAppState;
|
|
14
|
+
exports.installApp = installApp;
|
|
15
|
+
exports.activateApp = activateApp;
|
|
16
|
+
exports.isAppInstalled = isAppInstalled;
|
|
17
|
+
exports.terminateApp = terminateApp;
|
|
18
|
+
exports.queryAppState = queryAppState;
|
|
19
|
+
exports.mobileListApps = mobileListApps;
|
|
20
|
+
exports.mobileClearApp = mobileClearApp;
|
|
21
|
+
exports.background = background;
|
|
22
|
+
const lodash_1 = __importDefault(require("lodash"));
|
|
23
|
+
const support_1 = require("appium/support");
|
|
24
|
+
const driver_1 = require("appium/driver");
|
|
25
|
+
const appium_ios_device_1 = require("appium-ios-device");
|
|
26
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
27
|
+
const bluebird_1 = __importDefault(require("bluebird"));
|
|
28
|
+
const app_utils_1 = require("../app-utils");
|
|
29
|
+
/**
|
|
30
|
+
* Installs the given application to the device under test.
|
|
31
|
+
*
|
|
32
|
+
* Please ensure the app is built for a correct architecture and is signed with a proper developer signature (for real devices) prior to calling this.
|
|
33
|
+
* @param {string} app - See docs for `appium:app` capability
|
|
34
|
+
* @param {number} [timeoutMs] - The maximum time to wait until app install is finished (in ms) on real devices.
|
|
35
|
+
* If not provided, then the value of `appium:appPushTimeout` capability is used. If the capability is not provided then the default is 240000ms (4 minutes).
|
|
36
|
+
* @param {boolean} [checkVersion] - If the application installation follows currently installed application's version status if provided.
|
|
37
|
+
* No checking occurs if no this option.
|
|
38
|
+
* @privateRemarks Link to capability docs
|
|
39
|
+
* @returns {Promise<void>}
|
|
40
|
+
* @this {XCUITestDriver}
|
|
41
|
+
*/
|
|
42
|
+
async function mobileInstallApp(app, timeoutMs, checkVersion) {
|
|
43
|
+
const srcAppPath = await this.helpers.configureApp(app, {
|
|
44
|
+
onPostProcess: app_utils_1.onPostConfigureApp.bind(this),
|
|
45
|
+
onDownload: app_utils_1.onDownloadApp.bind(this),
|
|
46
|
+
supportedExtensions: app_utils_1.SUPPORTED_EXTENSIONS,
|
|
47
|
+
});
|
|
48
|
+
this.log.info(`Installing '${srcAppPath}' to the ${this.isRealDevice() ? 'real device' : 'Simulator'} ` +
|
|
49
|
+
`with UDID '${this.device.udid}'`);
|
|
50
|
+
if (!(await support_1.fs.exists(srcAppPath))) {
|
|
51
|
+
throw this.log.errorWithException(`The application at '${srcAppPath}' does not exist or is not accessible`);
|
|
52
|
+
}
|
|
53
|
+
const bundleId = await this.appInfosCache.extractBundleId(srcAppPath);
|
|
54
|
+
if (checkVersion) {
|
|
55
|
+
const { install } = await this.checkAutInstallationState({
|
|
56
|
+
enforceAppInstall: false,
|
|
57
|
+
fullReset: false,
|
|
58
|
+
noReset: false,
|
|
59
|
+
bundleId,
|
|
60
|
+
app: srcAppPath,
|
|
61
|
+
});
|
|
62
|
+
if (!install) {
|
|
63
|
+
this.log.info(`Skipping the installation of '${bundleId}'`);
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
await this.device.installApp(srcAppPath, bundleId, {
|
|
68
|
+
timeoutMs: timeoutMs ?? this.opts.appPushTimeout
|
|
69
|
+
});
|
|
70
|
+
this.log.info(`Installation of '${srcAppPath}' succeeded`);
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Checks whether the given application is installed on the device under test.
|
|
74
|
+
* Offload app is handled as not installed.
|
|
75
|
+
*
|
|
76
|
+
* @param {string} bundleId - The bundle identifier of the application to be checked
|
|
77
|
+
* @returns {Promise<boolean>} `true` if the application is installed; `false` otherwise
|
|
78
|
+
* @this {XCUITestDriver}
|
|
79
|
+
*/
|
|
80
|
+
async function mobileIsAppInstalled(bundleId) {
|
|
81
|
+
const installed = await this.device.isAppInstalled(bundleId);
|
|
82
|
+
this.log.info(`App '${bundleId}' is${installed ? '' : ' not'} installed`);
|
|
83
|
+
return installed;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Removes/uninstalls the given application from the device under test.
|
|
87
|
+
* Offload app data could also be removed.
|
|
88
|
+
*
|
|
89
|
+
* @param {string} bundleId - The bundle identifier of the application to be removed
|
|
90
|
+
* @returns {Promise<boolean>} `true` if the application has been removed successfully; `false` otherwise
|
|
91
|
+
* @this {XCUITestDriver}
|
|
92
|
+
*/
|
|
93
|
+
async function mobileRemoveApp(bundleId) {
|
|
94
|
+
this.log.info(`Uninstalling the application with bundle identifier '${bundleId}' ` +
|
|
95
|
+
`from the ${this.isRealDevice() ? 'real device' : 'Simulator'} with UDID '${this.device.udid}'`);
|
|
96
|
+
try {
|
|
97
|
+
await this.device.removeApp(bundleId);
|
|
98
|
+
this.log.info(`Removal of '${bundleId}' succeeded`);
|
|
99
|
+
return true;
|
|
100
|
+
}
|
|
101
|
+
catch (err) {
|
|
102
|
+
this.log.warn(`Cannot remove '${bundleId}'. Original error: ${err.message}`);
|
|
103
|
+
return false;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Executes the given app on the device under test.
|
|
108
|
+
*
|
|
109
|
+
* If the app is already running it will be activated. If the app is not installed or cannot be launched then an exception is thrown.
|
|
110
|
+
* @param {string} bundleId - The bundle identifier of the application to be launched
|
|
111
|
+
* @param {string|string[]} [args] - One or more command line arguments for the app. If the app is already running then this argument is ignored.
|
|
112
|
+
* @param {object} [environment] - Environment variables mapping for the app. If the app is already running then this argument is ignored.
|
|
113
|
+
* @returns {Promise<void>}
|
|
114
|
+
* @this {XCUITestDriver}
|
|
115
|
+
*/
|
|
116
|
+
async function mobileLaunchApp(bundleId, args, environment) {
|
|
117
|
+
/** @type { {arguments?: any[], environment?: any, bundleId: string} } */
|
|
118
|
+
const launchOptions = { bundleId };
|
|
119
|
+
if (args) {
|
|
120
|
+
launchOptions.arguments = Array.isArray(args) ? args : [args];
|
|
121
|
+
}
|
|
122
|
+
if (environment) {
|
|
123
|
+
launchOptions.environment = environment;
|
|
124
|
+
}
|
|
125
|
+
await this.proxyCommand('/wda/apps/launch', 'POST', launchOptions);
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Terminates the given app on the device under test.
|
|
129
|
+
*
|
|
130
|
+
* This command performs termination via [XCTest's `terminate`](https://developer.apple.com/documentation/xctest/xcuiapplication/1500637-terminate) API. If the app is not installed an exception is thrown. If the app is not running then nothing is done.
|
|
131
|
+
* @param {string} bundleId - The bundle identifier of the application to be terminated
|
|
132
|
+
* @returns {Promise<boolean>} `true` if the app has been terminated successfully; `false` otherwise
|
|
133
|
+
* @this {XCUITestDriver}
|
|
134
|
+
*/
|
|
135
|
+
async function mobileTerminateApp(bundleId) {
|
|
136
|
+
return /** @type {boolean} */ (await this.proxyCommand('/wda/apps/terminate', 'POST', { bundleId }));
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Activate the given app on the device under test.
|
|
140
|
+
*
|
|
141
|
+
* This pushes the app to the foreground if it is running in the background. An exception is thrown if the app is not install or isn't running. Nothing is done if the app is already in the foreground.
|
|
142
|
+
*
|
|
143
|
+
* @param {string} bundleId - The bundle identifier of the application to be activated
|
|
144
|
+
* @returns {Promise<void>}
|
|
145
|
+
* @this {XCUITestDriver}
|
|
146
|
+
*/
|
|
147
|
+
async function mobileActivateApp(bundleId) {
|
|
148
|
+
await this.proxyCommand('/wda/apps/activate', 'POST', { bundleId });
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Kill the given app on the real device under test by instruments service.
|
|
152
|
+
*
|
|
153
|
+
* If the app is not running or kill failed, then nothing is done.
|
|
154
|
+
*
|
|
155
|
+
* @remarks `appium-xcuitest-driver` v4.4 does not require `py-ios-device` to be installed.
|
|
156
|
+
* @privateRemarks See implementation at https://github.com/YueChen-C/py-ios-device/blob/51f4683c5c3c385a015858ada07a5f1c62d3cf57/ios_device/cli/base.py#L220
|
|
157
|
+
* @see https://github.com/YueChen-C/py-ios-device
|
|
158
|
+
* @param {string} bundleId - The bundle identifier of the application to be killed
|
|
159
|
+
* @returns {Promise<boolean>} `true` if the app has been killed successfully; `false` otherwise
|
|
160
|
+
* @group Real Device Only
|
|
161
|
+
* @this {XCUITestDriver}
|
|
162
|
+
*/
|
|
163
|
+
async function mobileKillApp(bundleId) {
|
|
164
|
+
if (!this.isRealDevice()) {
|
|
165
|
+
throw new driver_1.errors.UnsupportedOperationError('A real device is required');
|
|
166
|
+
}
|
|
167
|
+
return await /** @type {import('../real-device').RealDevice} */ (this.device).terminateApp(bundleId, String(this.opts.platformVersion));
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Queries the state of an installed application from the device under test.
|
|
171
|
+
*
|
|
172
|
+
* If the app with the given `bundleId` is not installed, an exception will be thrown.
|
|
173
|
+
*
|
|
174
|
+
* @param {string} bundleId - The bundle identifier of the application to be queried
|
|
175
|
+
* @returns {Promise<AppState>} The actual application state code
|
|
176
|
+
* @see https://developer.apple.com/documentation/xctest/xcuiapplicationstate?language=objc
|
|
177
|
+
* @this {XCUITestDriver}
|
|
178
|
+
*/
|
|
179
|
+
async function mobileQueryAppState(bundleId) {
|
|
180
|
+
return /** @type {AppState} */ (await this.proxyCommand('/wda/apps/state', 'POST', { bundleId }));
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* @param {string} appPath
|
|
184
|
+
* @param {object} opts
|
|
185
|
+
* @this {XCUITestDriver}
|
|
186
|
+
*/
|
|
187
|
+
async function installApp(appPath, { timeoutMs, strategy } = {}) {
|
|
188
|
+
// @ts-ignore Probably a TS bug
|
|
189
|
+
await this.mobileInstallApp(appPath, timeoutMs, strategy);
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* @param {string} bundleId
|
|
193
|
+
* @param {object} opts
|
|
194
|
+
* @this {XCUITestDriver}
|
|
195
|
+
*/
|
|
196
|
+
async function activateApp(bundleId, opts = {}) {
|
|
197
|
+
const { environment, arguments: args } = opts;
|
|
198
|
+
// @ts-ignore Probably a TS bug
|
|
199
|
+
return await this.mobileLaunchApp(bundleId, args, environment);
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* @param {string} bundleId
|
|
203
|
+
* @this {XCUITestDriver}
|
|
204
|
+
*/
|
|
205
|
+
async function isAppInstalled(bundleId) {
|
|
206
|
+
return await this.mobileIsAppInstalled(bundleId);
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* @param {string} bundleId
|
|
210
|
+
* @this {XCUITestDriver}
|
|
211
|
+
* @returns {Promise<boolean>}
|
|
212
|
+
*/
|
|
213
|
+
async function terminateApp(bundleId) {
|
|
214
|
+
return await this.mobileTerminateApp(bundleId);
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* @param {string} bundleId
|
|
218
|
+
* @this {XCUITestDriver}
|
|
219
|
+
*/
|
|
220
|
+
async function queryAppState(bundleId) {
|
|
221
|
+
return await this.mobileQueryAppState(bundleId);
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* List applications installed on the real device under test
|
|
225
|
+
*
|
|
226
|
+
* Read [Pushing/Pulling files](https://appium.io/docs/en/writing-running-appium/ios/ios-xctest-file-movement/) for more details.
|
|
227
|
+
* @param {'User'|'System'} applicationType - The type of applications to list.
|
|
228
|
+
* @returns {Promise<Record<string,any>[]>} A list of apps where each item is a mapping of bundle identifiers to maps of platform-specific app properties.
|
|
229
|
+
* @remarks Having `UIFileSharingEnabled` set to `true` in the return app properties map means this app supports file upload/download in its `documents` container.
|
|
230
|
+
* @group Real Device Only
|
|
231
|
+
*/
|
|
232
|
+
async function mobileListApps(applicationType = 'User') {
|
|
233
|
+
if (!this.isRealDevice()) {
|
|
234
|
+
throw new driver_1.errors.NotImplementedError(`This extension is only supported on real devices`);
|
|
235
|
+
}
|
|
236
|
+
const service = await appium_ios_device_1.services.startInstallationProxyService(this.device.udid);
|
|
237
|
+
try {
|
|
238
|
+
return await service.listApplications({ applicationType });
|
|
239
|
+
}
|
|
240
|
+
finally {
|
|
241
|
+
service.close();
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Deletes application data files, so it could start from the clean state next time
|
|
246
|
+
* it is launched.
|
|
247
|
+
* This API only works on a Simulator.
|
|
248
|
+
*
|
|
249
|
+
* @param {string} bundleId Application bundle identifier
|
|
250
|
+
* @this {XCUITestDriver}
|
|
251
|
+
* @returns {Promise<boolean>} true if any files from the app's data container have been deleted
|
|
252
|
+
*/
|
|
253
|
+
async function mobileClearApp(bundleId) {
|
|
254
|
+
if (this.isRealDevice()) {
|
|
255
|
+
throw new driver_1.errors.NotImplementedError(`This extension is only supported on simulators. ` +
|
|
256
|
+
`The only known way to clear app data on real devices ` +
|
|
257
|
+
`would be to uninstall the app then perform a fresh install of it.`);
|
|
258
|
+
}
|
|
259
|
+
const simctl = /** @type {import('../driver').Simulator} */ (this.device).simctl;
|
|
260
|
+
const dataRoot = await simctl.getAppContainer(bundleId, 'data');
|
|
261
|
+
this.log.debug(`Got the data container root of ${bundleId} at '${dataRoot}'`);
|
|
262
|
+
if (!await support_1.fs.exists(dataRoot)) {
|
|
263
|
+
return false;
|
|
264
|
+
}
|
|
265
|
+
await this.mobileTerminateApp(bundleId);
|
|
266
|
+
const items = await support_1.fs.readdir(dataRoot);
|
|
267
|
+
if (!items.length) {
|
|
268
|
+
return false;
|
|
269
|
+
}
|
|
270
|
+
await bluebird_1.default.all(items.map((item) => support_1.fs.rimraf(node_path_1.default.join(dataRoot, item))));
|
|
271
|
+
this.log.info(`Cleaned up ${support_1.util.pluralize('item', items.length, true)} from ${bundleId}'s data container`);
|
|
272
|
+
return true;
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Close app (simulate device home button). It is possible to restore
|
|
276
|
+
* the app after the timeout or keep it minimized based on the parameter value.
|
|
277
|
+
*
|
|
278
|
+
* @param {number|{timeout: number?}} [seconds]
|
|
279
|
+
* - any positive number of seconds: come back after X seconds
|
|
280
|
+
* - any negative number of seconds or zero: never come back
|
|
281
|
+
* - undefined/null: never come back
|
|
282
|
+
* - {timeout: 5000}: come back after 5 seconds
|
|
283
|
+
* - {timeout: null}, {timeout: -2}: never come back
|
|
284
|
+
* @this {XCUITestDriver}
|
|
285
|
+
*/
|
|
286
|
+
async function background(seconds) {
|
|
287
|
+
const homescreen = '/wda/homescreen';
|
|
288
|
+
const deactivateApp = '/wda/deactivateApp';
|
|
289
|
+
let endpoint;
|
|
290
|
+
let params = {};
|
|
291
|
+
const selectEndpoint = (timeoutSeconds) => {
|
|
292
|
+
if (!support_1.util.hasValue(timeoutSeconds)) {
|
|
293
|
+
endpoint = homescreen;
|
|
294
|
+
}
|
|
295
|
+
else if (!isNaN(timeoutSeconds)) {
|
|
296
|
+
const duration = parseFloat(timeoutSeconds);
|
|
297
|
+
if (duration >= 0) {
|
|
298
|
+
params = { duration };
|
|
299
|
+
endpoint = deactivateApp;
|
|
300
|
+
}
|
|
301
|
+
else {
|
|
302
|
+
endpoint = homescreen;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
};
|
|
306
|
+
if (seconds && !lodash_1.default.isNumber(seconds) && lodash_1.default.has(seconds, 'timeout')) {
|
|
307
|
+
const timeout = seconds.timeout;
|
|
308
|
+
selectEndpoint(isNaN(Number(timeout)) ? timeout : parseFloat(String(timeout)) / 1000.0);
|
|
309
|
+
}
|
|
310
|
+
else {
|
|
311
|
+
selectEndpoint(seconds);
|
|
312
|
+
}
|
|
313
|
+
if (!endpoint) {
|
|
314
|
+
throw new driver_1.errors.InvalidArgumentError(`Argument value is expected to be a valid number. ` +
|
|
315
|
+
`${JSON.stringify(seconds)} has been provided instead`);
|
|
316
|
+
}
|
|
317
|
+
return await this.proxyCommand(endpoint, 'POST', params, endpoint !== homescreen);
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* @typedef {import('../driver').XCUITestDriver} XCUITestDriver
|
|
321
|
+
* @typedef {import('./enum').AppState} AppState
|
|
322
|
+
*/
|
|
323
|
+
//# sourceMappingURL=app-management.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-management.js","sourceRoot":"","sources":["../../../lib/commands/app-management.js"],"names":[],"mappings":";;;;;AAyBA,4CAwCC;AAUD,oDAIC;AAUD,0CAaC;AAYD,0CAUC;AAUD,gDAIC;AAWD,8CAEC;AAeD,sCAQC;AAYD,kDAEC;AAOD,gCAGC;AAOD,kCAIC;AAMD,wCAEC;AAOD,oCAEC;AAMD,sCAEC;AAWD,wCAWC;AAWD,wCA2BC;AAcD,gCAgCC;AApVD,oDAAuB;AACvB,4CAAwC;AACxC,0C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,CAAC,CAAC;IAC1B,CAAC;IACD,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,eAAM,CAAC,oBAAoB,CACnC,mDAAmD;YACjD,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,4BAA4B,CACzD,CAAC;IACJ,CAAC;IACD,OAAO,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,KAAK,UAAU,CAAC,CAAC;AACpF,CAAC;AAED;;;GAGG"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Return the language-specific strings for an app
|
|
3
|
+
*
|
|
4
|
+
* @param {string} language - The language abbreviation to fetch app strings mapping for.
|
|
5
|
+
* If no language is provided then strings for the 'en language would be returned
|
|
6
|
+
* @param {string|null} [stringFile=null] - Relative path to the corresponding .strings
|
|
7
|
+
* file starting from the corresponding .lproj folder, e.g., `base/main.strings`. If omitted,
|
|
8
|
+
* then Appium will make its best guess where the file is.
|
|
9
|
+
*
|
|
10
|
+
* @returns {Promise<import('@appium/types').StringRecord<string>>} A record of localized keys to localized text
|
|
11
|
+
*
|
|
12
|
+
* @this {XCUITestDriver}
|
|
13
|
+
*/
|
|
14
|
+
export function getStrings(this: import("../driver").XCUITestDriver, language: string, stringFile?: string | null): Promise<import("@appium/types").StringRecord<string>>;
|
|
15
|
+
export type XCUITestDriver = import("../driver").XCUITestDriver;
|
|
16
|
+
//# sourceMappingURL=app-strings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-strings.d.ts","sourceRoot":"","sources":["../../../lib/commands/app-strings.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AACH,+EAVW,MAAM,eAEN,MAAM,GAAC,IAAI,GAIT,OAAO,CAAC,OAAO,eAAe,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,CAcjE;6BAGY,OAAO,WAAW,EAAE,cAAc"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getStrings = getStrings;
|
|
4
|
+
const app_utils_1 = require("../app-utils");
|
|
5
|
+
/**
|
|
6
|
+
* Return the language-specific strings for an app
|
|
7
|
+
*
|
|
8
|
+
* @param {string} language - The language abbreviation to fetch app strings mapping for.
|
|
9
|
+
* If no language is provided then strings for the 'en language would be returned
|
|
10
|
+
* @param {string|null} [stringFile=null] - Relative path to the corresponding .strings
|
|
11
|
+
* file starting from the corresponding .lproj folder, e.g., `base/main.strings`. If omitted,
|
|
12
|
+
* then Appium will make its best guess where the file is.
|
|
13
|
+
*
|
|
14
|
+
* @returns {Promise<import('@appium/types').StringRecord<string>>} A record of localized keys to localized text
|
|
15
|
+
*
|
|
16
|
+
* @this {XCUITestDriver}
|
|
17
|
+
*/
|
|
18
|
+
async function getStrings(language, stringFile = null) {
|
|
19
|
+
this.log.debug(`Gettings strings for language '${language}' and string file '${stringFile}'`);
|
|
20
|
+
return await app_utils_1.parseLocalizableStrings.bind(this)({
|
|
21
|
+
...this.opts,
|
|
22
|
+
language,
|
|
23
|
+
stringFile,
|
|
24
|
+
strictMode: true,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* @typedef {import('../driver').XCUITestDriver} XCUITestDriver
|
|
29
|
+
*/
|
|
30
|
+
//# sourceMappingURL=app-strings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-strings.js","sourceRoot":"","sources":["../../../lib/commands/app-strings.js"],"names":[],"mappings":";;AAeA,gCAUC;AAzBD,4CAAqD;AAErD;;;;;;;;;;;;GAYG;AACI,KAAK,UAAU,UAAU,CAAC,QAAQ,EAAE,UAAU,GAAG,IAAI;IAC1D,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,kCAAkC,QAAQ,sBAAsB,UAAU,GAAG,CAAC,CAAC;IAC9F,OAAO,MAAM,mCAAuB,CAAC,IAAI,CAAC,IAAI,CAAC,CAC7C;QACE,GAAG,IAAI,CAAC,IAAI;QACZ,QAAQ;QACR,UAAU;QACV,UAAU,EAAE,IAAI;KACjB,CACF,CAAC;AACJ,CAAC;AAED;;GAEG"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Set the device's UI appearance style
|
|
3
|
+
*
|
|
4
|
+
* @since iOS 12.0
|
|
5
|
+
* @param {'dark'|'light'} style - The appearance style to set
|
|
6
|
+
* @throws {Error} if the current platform does not support UI appearance changes
|
|
7
|
+
* @this {XCUITestDriver}
|
|
8
|
+
*/
|
|
9
|
+
export function mobileSetAppearance(this: import("../driver").XCUITestDriver, style: "dark" | "light"): Promise<undefined>;
|
|
10
|
+
/**
|
|
11
|
+
* Get the device's UI appearance style.
|
|
12
|
+
*
|
|
13
|
+
* @since Xcode SDK 11
|
|
14
|
+
* @returns {Promise<{style: Style}>}
|
|
15
|
+
* @this {XCUITestDriver}
|
|
16
|
+
*/
|
|
17
|
+
export function mobileGetAppearance(this: import("../driver").XCUITestDriver): Promise<{
|
|
18
|
+
style: Style;
|
|
19
|
+
}>;
|
|
20
|
+
export type XCUITestDriver = import("../driver").XCUITestDriver;
|
|
21
|
+
export type Style = import("./types").Style;
|
|
22
|
+
//# sourceMappingURL=appearance.d.ts.map
|