@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,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sets the Simulator's pasteboard content to the given value.
|
|
3
|
+
*
|
|
4
|
+
* Does not work for real devices.
|
|
5
|
+
* @param {string} content - The content to set
|
|
6
|
+
* @param {string} encoding - The content's encoding
|
|
7
|
+
* @group Simulator Only
|
|
8
|
+
* @returns {Promise<void>}
|
|
9
|
+
* @this {XCUITestDriver}
|
|
10
|
+
*/
|
|
11
|
+
export function mobileSetPasteboard(this: import("../driver").XCUITestDriver, content: string, encoding?: string): Promise<void>;
|
|
12
|
+
/**
|
|
13
|
+
* Gets the Simulator's pasteboard content.
|
|
14
|
+
*
|
|
15
|
+
* Does not work for real devices.
|
|
16
|
+
* @param {BufferEncoding} encoding - Expected encoding of returned string
|
|
17
|
+
* @group Simulator Only
|
|
18
|
+
* @this {XCUITestDriver}
|
|
19
|
+
* @returns {Promise<string>} The pasteboard content string
|
|
20
|
+
*/
|
|
21
|
+
export function mobileGetPasteboard(this: import("../driver").XCUITestDriver, encoding?: BufferEncoding): Promise<string>;
|
|
22
|
+
export type XCUITestDriver = import("../driver").XCUITestDriver;
|
|
23
|
+
//# sourceMappingURL=pasteboard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pasteboard.d.ts","sourceRoot":"","sources":["../../../lib/commands/pasteboard.js"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,uFANW,MAAM,aACN,MAAM,GAEJ,OAAO,CAAC,IAAI,CAAC,CAczB;AAED;;;;;;;;GAQG;AACH,yFALW,cAAc,GAGZ,OAAO,CAAC,MAAM,CAAC,CAO3B;6BAGY,OAAO,WAAW,EAAE,cAAc"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mobileSetPasteboard = mobileSetPasteboard;
|
|
4
|
+
exports.mobileGetPasteboard = mobileGetPasteboard;
|
|
5
|
+
/**
|
|
6
|
+
* Sets the Simulator's pasteboard content to the given value.
|
|
7
|
+
*
|
|
8
|
+
* Does not work for real devices.
|
|
9
|
+
* @param {string} content - The content to set
|
|
10
|
+
* @param {string} encoding - The content's encoding
|
|
11
|
+
* @group Simulator Only
|
|
12
|
+
* @returns {Promise<void>}
|
|
13
|
+
* @this {XCUITestDriver}
|
|
14
|
+
*/
|
|
15
|
+
async function mobileSetPasteboard(content, encoding = 'utf8') {
|
|
16
|
+
if (!this.isSimulator()) {
|
|
17
|
+
throw new Error('Setting pasteboard content is not supported on real devices');
|
|
18
|
+
}
|
|
19
|
+
if (!content) {
|
|
20
|
+
// can be empty string
|
|
21
|
+
throw new Error('Pasteboard content is mandatory to set');
|
|
22
|
+
}
|
|
23
|
+
return await /** @type {import('../driver').Simulator} */ (this.device).simctl.setPasteboard(content, /** @type {BufferEncoding} */ (encoding));
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Gets the Simulator's pasteboard content.
|
|
27
|
+
*
|
|
28
|
+
* Does not work for real devices.
|
|
29
|
+
* @param {BufferEncoding} encoding - Expected encoding of returned string
|
|
30
|
+
* @group Simulator Only
|
|
31
|
+
* @this {XCUITestDriver}
|
|
32
|
+
* @returns {Promise<string>} The pasteboard content string
|
|
33
|
+
*/
|
|
34
|
+
async function mobileGetPasteboard(encoding = 'utf8') {
|
|
35
|
+
if (!this.isSimulator()) {
|
|
36
|
+
throw new Error('Getting pasteboard content is not supported on real devices');
|
|
37
|
+
}
|
|
38
|
+
return await /** @type {import('../driver').Simulator} */ (this.device).simctl.getPasteboard(encoding);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* @typedef {import('../driver').XCUITestDriver} XCUITestDriver
|
|
42
|
+
*/
|
|
43
|
+
//# sourceMappingURL=pasteboard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pasteboard.js","sourceRoot":"","sources":["../../../lib/commands/pasteboard.js"],"names":[],"mappings":";;AAUA,kDAWC;AAWD,kDAKC;AArCD;;;;;;;;;GASG;AACI,KAAK,UAAU,mBAAmB,CAAC,OAAO,EAAE,QAAQ,GAAG,MAAM;IAClE,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;QACxB,MAAM,IAAI,KAAK,CAAC,6DAA6D,CAAC,CAAC;IACjF,CAAC;IACD,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,sBAAsB;QACtB,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;IAC5D,CAAC;IACD,OAAO,MAAM,4CAA4C,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,aAAa,CAC1F,OAAO,EAAE,6BAA6B,CAAC,CAAC,QAAQ,CAAC,CAClD,CAAC;AACJ,CAAC;AAED;;;;;;;;GAQG;AACI,KAAK,UAAU,mBAAmB,CAAC,QAAQ,GAAG,MAAM;IACzD,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;QACxB,MAAM,IAAI,KAAK,CAAC,6DAA6D,CAAC,CAAC;IACjF,CAAC;IACD,OAAO,MAAM,4CAA4C,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;AACzG,CAAC;AAED;;GAEG"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Records the given network traffic capture into a .pcap file.
|
|
3
|
+
*
|
|
4
|
+
* @param {number} timeLimitSec - The maximum recording time, in seconds. The maximum value is `43200` (12 hours).
|
|
5
|
+
* @param {boolean} forceRestart - Whether to restart traffic capture process forcefully when startPcap is called (`true`) or ignore the call until the current traffic capture is completed (`false`, the default value).
|
|
6
|
+
* @throws {Error} If network traffic capture has failed to start.
|
|
7
|
+
* @returns {Promise<void>}
|
|
8
|
+
* @this {XCUITestDriver}
|
|
9
|
+
*/
|
|
10
|
+
export function mobileStartPcap(this: import("../driver").XCUITestDriver, timeLimitSec?: number, forceRestart?: boolean): Promise<void>;
|
|
11
|
+
export class mobileStartPcap {
|
|
12
|
+
/**
|
|
13
|
+
* Records the given network traffic capture into a .pcap file.
|
|
14
|
+
*
|
|
15
|
+
* @param {number} timeLimitSec - The maximum recording time, in seconds. The maximum value is `43200` (12 hours).
|
|
16
|
+
* @param {boolean} forceRestart - Whether to restart traffic capture process forcefully when startPcap is called (`true`) or ignore the call until the current traffic capture is completed (`false`, the default value).
|
|
17
|
+
* @throws {Error} If network traffic capture has failed to start.
|
|
18
|
+
* @returns {Promise<void>}
|
|
19
|
+
* @this {XCUITestDriver}
|
|
20
|
+
*/
|
|
21
|
+
constructor(this: import("../driver").XCUITestDriver, timeLimitSec?: number, forceRestart?: boolean);
|
|
22
|
+
_trafficCapture: TrafficCapture;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Stops network traffic capture.
|
|
26
|
+
*
|
|
27
|
+
* If no traffic capture process is running, then the endpoint will try to get the recently recorded file.
|
|
28
|
+
*
|
|
29
|
+
* If no previously recorded file is found and no active traffic capture processes are running, then the method returns an empty string.
|
|
30
|
+
*
|
|
31
|
+
* @remarks Network capture files can be viewed in [Wireshark](https://www.wireshark.org/) and other similar applications.
|
|
32
|
+
* @returns {Promise<string>} Base64-encoded content of the recorded pcap file or an empty string if no traffic capture has been started before.
|
|
33
|
+
* @throws {Error} If there was an error while getting the capture file.
|
|
34
|
+
* @this {XCUITestDriver}
|
|
35
|
+
*/
|
|
36
|
+
export function mobileStopPcap(this: import("../driver").XCUITestDriver): Promise<string>;
|
|
37
|
+
export class mobileStopPcap {
|
|
38
|
+
_trafficCapture: any;
|
|
39
|
+
}
|
|
40
|
+
export class TrafficCapture {
|
|
41
|
+
constructor(udid: any, log: any, resultPath: any);
|
|
42
|
+
/** @type {import('teen_process').SubProcess|null} */
|
|
43
|
+
mainProcess: any | null;
|
|
44
|
+
udid: any;
|
|
45
|
+
log: any;
|
|
46
|
+
resultPath: any;
|
|
47
|
+
start(timeoutSeconds: any): Promise<void>;
|
|
48
|
+
isCapturing(): boolean;
|
|
49
|
+
interrupt(force?: boolean): Promise<boolean>;
|
|
50
|
+
finish(): Promise<any>;
|
|
51
|
+
cleanup(): Promise<void>;
|
|
52
|
+
}
|
|
53
|
+
export type XCUITestDriver = import("../driver").XCUITestDriver;
|
|
54
|
+
//# sourceMappingURL=pcap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pcap.d.ts","sourceRoot":"","sources":["../../../lib/commands/pcap.js"],"names":[],"mappings":"AAyEA;;;;;;;;GAQG;AACH,yFANW,MAAM,iBACN,OAAO,GAEL,OAAO,CAAC,IAAI,CAAC,CAgDzB;;IAtDD;;;;;;;;OAQG;IACH,qEANW,MAAM,iBACN,OAAO,EAkDjB;IAzBG,gCAA2B;;AA2B/B;;;;;;;;;;;GAWG;AACH,0EAJa,OAAO,CAAC,MAAM,CAAC,CA0B3B;;IAJG,qBAA2B;;AAvJ/B;IAGE,kDAKC;IAPD,qDAAqD;IACrD,aADW,GAAiC,GAAC,IAAI,CACrC;IAEV,UAAgB;IAChB,SAAc;IACd,gBAA4B;IAI9B,0CAmBC;IAED,uBAEC;IAED,6CAgBC;IAED,uBAGC;IAED,yBAIC;CACF;6BA+FY,OAAO,WAAW,EAAE,cAAc"}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TrafficCapture = void 0;
|
|
4
|
+
exports.mobileStartPcap = mobileStartPcap;
|
|
5
|
+
exports.mobileStopPcap = mobileStopPcap;
|
|
6
|
+
const py_ios_device_client_1 = require("../real-device-clients/py-ios-device-client");
|
|
7
|
+
const support_1 = require("appium/support");
|
|
8
|
+
const utils_1 = require("../utils");
|
|
9
|
+
const driver_1 = require("appium/driver");
|
|
10
|
+
const MAX_CAPTURE_TIME_SEC = 60 * 60 * 12;
|
|
11
|
+
const DEFAULT_EXT = '.pcap';
|
|
12
|
+
class TrafficCapture {
|
|
13
|
+
/** @type {import('teen_process').SubProcess|null} */
|
|
14
|
+
mainProcess;
|
|
15
|
+
constructor(udid, log, resultPath) {
|
|
16
|
+
this.udid = udid;
|
|
17
|
+
this.log = log;
|
|
18
|
+
this.resultPath = resultPath;
|
|
19
|
+
this.mainProcess = null;
|
|
20
|
+
}
|
|
21
|
+
async start(timeoutSeconds) {
|
|
22
|
+
this.mainProcess = /** @type {import('teen_process').SubProcess} */ (await new py_ios_device_client_1.Pyidevice({
|
|
23
|
+
udid: this.udid,
|
|
24
|
+
log: this.log,
|
|
25
|
+
}).collectPcap(this.resultPath));
|
|
26
|
+
this.mainProcess.on('line-stderr', (line) => this.log.info(`[Pcap] ${line}`));
|
|
27
|
+
this.log.info(`Starting network traffic capture session on the device '${this.udid}'. ` +
|
|
28
|
+
`Will timeout in ${timeoutSeconds}s`);
|
|
29
|
+
setTimeout(async () => await this.interrupt(), timeoutSeconds * 1000);
|
|
30
|
+
this.mainProcess.once('exit', (code, signal) => {
|
|
31
|
+
this.log.debug(`The traffic capture session on the device '${this.udid}' has exited ` +
|
|
32
|
+
`with code ${code}, signal ${signal}`);
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
isCapturing() {
|
|
36
|
+
return !!this.mainProcess?.isRunning;
|
|
37
|
+
}
|
|
38
|
+
async interrupt(force = false) {
|
|
39
|
+
if (this.isCapturing()) {
|
|
40
|
+
const interruptPromise = this.mainProcess?.stop(force ? 'SIGTERM' : 'SIGINT');
|
|
41
|
+
this.mainProcess = null;
|
|
42
|
+
try {
|
|
43
|
+
await interruptPromise;
|
|
44
|
+
}
|
|
45
|
+
catch (e) {
|
|
46
|
+
this.log.warn(`Cannot ${force ? 'terminate' : 'interrupt'} the traffic capture session. ` +
|
|
47
|
+
`Original error: ${e.message}`);
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return true;
|
|
52
|
+
}
|
|
53
|
+
async finish() {
|
|
54
|
+
await this.interrupt();
|
|
55
|
+
return this.resultPath;
|
|
56
|
+
}
|
|
57
|
+
async cleanup() {
|
|
58
|
+
if (await support_1.fs.exists(this.resultPath)) {
|
|
59
|
+
await support_1.fs.rimraf(this.resultPath);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
exports.TrafficCapture = TrafficCapture;
|
|
64
|
+
/**
|
|
65
|
+
* Records the given network traffic capture into a .pcap file.
|
|
66
|
+
*
|
|
67
|
+
* @param {number} timeLimitSec - The maximum recording time, in seconds. The maximum value is `43200` (12 hours).
|
|
68
|
+
* @param {boolean} forceRestart - Whether to restart traffic capture process forcefully when startPcap is called (`true`) or ignore the call until the current traffic capture is completed (`false`, the default value).
|
|
69
|
+
* @throws {Error} If network traffic capture has failed to start.
|
|
70
|
+
* @returns {Promise<void>}
|
|
71
|
+
* @this {XCUITestDriver}
|
|
72
|
+
*/
|
|
73
|
+
async function mobileStartPcap(timeLimitSec = 180, forceRestart = false) {
|
|
74
|
+
if (this.isSimulator()) {
|
|
75
|
+
throw this.log.errorWithException('Network traffic capture only works on real devices');
|
|
76
|
+
}
|
|
77
|
+
if (this._trafficCapture?.isCapturing()) {
|
|
78
|
+
this.log.info(`There is an active traffic capture process`);
|
|
79
|
+
if (forceRestart) {
|
|
80
|
+
this.log.info(`Stopping it because 'forceRestart' option is set to true`);
|
|
81
|
+
await this._trafficCapture.interrupt(true);
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
this.log.info(`Doing nothing. ` +
|
|
85
|
+
`Set 'forceRestart' option to true if you'd like to start a new traffic capture session`);
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
if (this._trafficCapture) {
|
|
90
|
+
await this._trafficCapture.cleanup();
|
|
91
|
+
this._trafficCapture = null;
|
|
92
|
+
}
|
|
93
|
+
const resultPath = await support_1.tempDir.path({
|
|
94
|
+
prefix: `appium_${support_1.util.uuidV4().substring(0, 8)}`,
|
|
95
|
+
suffix: DEFAULT_EXT,
|
|
96
|
+
});
|
|
97
|
+
const trafficCollector = new TrafficCapture(this.device.udid, this.log, resultPath);
|
|
98
|
+
const timeoutSeconds = parseInt(String(timeLimitSec), 10);
|
|
99
|
+
if (isNaN(timeoutSeconds) || timeoutSeconds > MAX_CAPTURE_TIME_SEC || timeoutSeconds <= 0) {
|
|
100
|
+
throw new driver_1.errors.InvalidArgumentError(`The timeLimitSec value must be in range [1, ${MAX_CAPTURE_TIME_SEC}] seconds. ` +
|
|
101
|
+
`The value of '${timeLimitSec}' has been passed instead.`);
|
|
102
|
+
}
|
|
103
|
+
try {
|
|
104
|
+
await trafficCollector.start(timeoutSeconds);
|
|
105
|
+
}
|
|
106
|
+
catch (e) {
|
|
107
|
+
await trafficCollector.interrupt(true);
|
|
108
|
+
await trafficCollector.cleanup();
|
|
109
|
+
throw e;
|
|
110
|
+
}
|
|
111
|
+
this._trafficCapture = trafficCollector;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Stops network traffic capture.
|
|
115
|
+
*
|
|
116
|
+
* If no traffic capture process is running, then the endpoint will try to get the recently recorded file.
|
|
117
|
+
*
|
|
118
|
+
* If no previously recorded file is found and no active traffic capture processes are running, then the method returns an empty string.
|
|
119
|
+
*
|
|
120
|
+
* @remarks Network capture files can be viewed in [Wireshark](https://www.wireshark.org/) and other similar applications.
|
|
121
|
+
* @returns {Promise<string>} Base64-encoded content of the recorded pcap file or an empty string if no traffic capture has been started before.
|
|
122
|
+
* @throws {Error} If there was an error while getting the capture file.
|
|
123
|
+
* @this {XCUITestDriver}
|
|
124
|
+
*/
|
|
125
|
+
async function mobileStopPcap() {
|
|
126
|
+
if (!this._trafficCapture) {
|
|
127
|
+
this.log.info('Network traffic collector has not been started. There is nothing to stop');
|
|
128
|
+
return '';
|
|
129
|
+
}
|
|
130
|
+
let resultPath;
|
|
131
|
+
try {
|
|
132
|
+
resultPath = await this._trafficCapture.finish();
|
|
133
|
+
if (!(await support_1.fs.exists(resultPath))) {
|
|
134
|
+
throw this.log.errorWithException(`The network traffic capture utility has failed ` +
|
|
135
|
+
`to store the actual traffic capture at '${resultPath}'`);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
catch (e) {
|
|
139
|
+
await this._trafficCapture.interrupt(true);
|
|
140
|
+
await this._trafficCapture.cleanup();
|
|
141
|
+
this._trafficCapture = null;
|
|
142
|
+
throw e;
|
|
143
|
+
}
|
|
144
|
+
return await (0, utils_1.encodeBase64OrUpload)(resultPath);
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* @typedef {import('../driver').XCUITestDriver} XCUITestDriver
|
|
148
|
+
*/
|
|
149
|
+
//# sourceMappingURL=pcap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pcap.js","sourceRoot":"","sources":["../../../lib/commands/pcap.js"],"names":[],"mappings":";;;AAkFA,0CA6CC;AAcD,wCAsBC;AAnKD,sFAAwE;AACxE,4CAAiD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security is mandatory for simulators. It can always work for real devices.
|
|
5
|
+
*
|
|
6
|
+
* Since XCode 12 the method tries to use `xctrace` tool to record performance stats.
|
|
7
|
+
*
|
|
8
|
+
* The `instruments` developer utility is used as a fallback for this purpose if `xctrace` is not available.
|
|
9
|
+
*
|
|
10
|
+
* It is possible to record multiple profiles at the same time.
|
|
11
|
+
*
|
|
12
|
+
* Read [Recording, Pausing, and Stopping Traces](https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/Recording,Pausing,andStoppingTraces.html) for more details.
|
|
13
|
+
*
|
|
14
|
+
* @param {number} timeout - The maximum count of milliseconds to record the profiling information.
|
|
15
|
+
* @param {string} profileName - The name of existing performance profile to apply. Can also contain the full path to the chosen template on the server file system. Note: not all profiles are supported on mobile devices.
|
|
16
|
+
* @param {number|'current'} [pid] - The ID of the process to measure the performance for. Set it to `current` in order to measure the performance of the process, which belongs to the currently active application. All processes running on the device are measured if `pid` is unset (the default setting).
|
|
17
|
+
* @this {XCUITestDriver}
|
|
18
|
+
*/
|
|
19
|
+
export function mobileStartPerfRecord(this: import("../driver").XCUITestDriver, timeout?: number, profileName?: string, pid?: number | "current"): Promise<void>;
|
|
20
|
+
export class mobileStartPerfRecord {
|
|
21
|
+
/**
|
|
22
|
+
* Starts performance profiling for the device under test.
|
|
23
|
+
*
|
|
24
|
+
* Relaxing security is mandatory for simulators. It can always work for real devices.
|
|
25
|
+
*
|
|
26
|
+
* Since XCode 12 the method tries to use `xctrace` tool to record performance stats.
|
|
27
|
+
*
|
|
28
|
+
* The `instruments` developer utility is used as a fallback for this purpose if `xctrace` is not available.
|
|
29
|
+
*
|
|
30
|
+
* It is possible to record multiple profiles at the same time.
|
|
31
|
+
*
|
|
32
|
+
* Read [Recording, Pausing, and Stopping Traces](https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/Recording,Pausing,andStoppingTraces.html) for more details.
|
|
33
|
+
*
|
|
34
|
+
* @param {number} timeout - The maximum count of milliseconds to record the profiling information.
|
|
35
|
+
* @param {string} profileName - The name of existing performance profile to apply. Can also contain the full path to the chosen template on the server file system. Note: not all profiles are supported on mobile devices.
|
|
36
|
+
* @param {number|'current'} [pid] - The ID of the process to measure the performance for. Set it to `current` in order to measure the performance of the process, which belongs to the currently active application. All processes running on the device are measured if `pid` is unset (the default setting).
|
|
37
|
+
* @this {XCUITestDriver}
|
|
38
|
+
*/
|
|
39
|
+
constructor(this: import("../driver").XCUITestDriver, timeout?: number, profileName?: string, pid?: number | "current");
|
|
40
|
+
_perfRecorders: PerfRecorder[] | undefined;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Stops performance recording operation previously started by {@linkcode XCUITestDriver.mobileStartPerfRecord mobile: startPerfRecord}.
|
|
44
|
+
*
|
|
45
|
+
* If the previous call has already been completed due to the timeout, then its result is returned immediately. An error is thrown if the performance recording failed to start.
|
|
46
|
+
*
|
|
47
|
+
* The resulting file in `.trace` format can be either returned directly as base64-encoded zip archive or uploaded to a remote location (such files can be pretty large). Afterwards it is possible to unarchive and open such files with Xcode Dev Tools.
|
|
48
|
+
*
|
|
49
|
+
* @param {string} [remotePath] - The path to the remote location, where the resulting zipped `.trace` file should be uploaded. The following protocols are supported: `http`, `https`, `ftp`. Null or empty string value (the default setting) means the content of resulting file should be zipped, encoded as Base64 and passed as the endpoint response value. An exception will be thrown if the generated file is too big to fit into the available process memory.
|
|
50
|
+
* @param {string} [user] - The name of the user for the remote authentication. Only works if `remotePath` is provided.
|
|
51
|
+
* @param {string} [pass] - The password for the remote authentication. Only works if `remotePath` is provided.
|
|
52
|
+
* @param {import('axios').Method} [method] - The http multipart upload method name. Only works if `remotePath` is provided. Defaults to `PUT`
|
|
53
|
+
* @param {string} profileName - The name of existing performance profile to stop the recording for. Multiple recorders for different profile names could be executed at the same time.
|
|
54
|
+
* @param {Record<string,any>} [headers] - Additional headers mapping for multipart http(s) uploads
|
|
55
|
+
* @param {string} [fileFieldName] - The name of the form field, where the file content BLOB should be stored for http(s) uploads. Defaults to `file`
|
|
56
|
+
* @param {Record<string,any>|([string, any])[]} [formFields] - Additional form fields for multipart http(s) uploads
|
|
57
|
+
*
|
|
58
|
+
* @returns {Promise<string>} The resulting file in `.trace` format. This file can either be returned directly as base64-encoded `.zip` archive or uploaded to a remote location (note that such files may be large), _depending on the `remotePath` argument value._ Thereafter, the file may be unarchived and opened with Xcode Developer Tools.
|
|
59
|
+
* @throws {Error} If no performance recording with given profile name/device udid combination
|
|
60
|
+
* has been started before or the resulting .trace file has not been generated properly.
|
|
61
|
+
* @this {XCUITestDriver}
|
|
62
|
+
*/
|
|
63
|
+
export function mobileStopPerfRecord(this: import("../driver").XCUITestDriver, remotePath?: string, user?: string, pass?: string, method?: import("axios").Method, profileName?: string, headers?: Record<string, any>, fileFieldName?: string, formFields?: Record<string, any> | ([string, any])[]): Promise<string>;
|
|
64
|
+
export class PerfRecorder {
|
|
65
|
+
constructor(reportRoot: any, udid: any, opts?: {});
|
|
66
|
+
/** @type {import('teen_process').SubProcess|null} */
|
|
67
|
+
_process: any | null;
|
|
68
|
+
_zippedReportPath: string;
|
|
69
|
+
_timeout: any;
|
|
70
|
+
_profileName: any;
|
|
71
|
+
_reportPath: string;
|
|
72
|
+
_pid: any;
|
|
73
|
+
_udid: any;
|
|
74
|
+
_logger: import("@appium/types").AppiumLogger;
|
|
75
|
+
_archivePromise: Promise<string> | null;
|
|
76
|
+
get profileName(): any;
|
|
77
|
+
getOriginalReportPath(): Promise<string>;
|
|
78
|
+
getZippedReportPath(): Promise<string>;
|
|
79
|
+
isRunning(): boolean;
|
|
80
|
+
_enforceTermination(): Promise<string>;
|
|
81
|
+
start(): Promise<void>;
|
|
82
|
+
stop(force?: boolean): Promise<string>;
|
|
83
|
+
}
|
|
84
|
+
export type XCUITestDriver = import("../driver").XCUITestDriver;
|
|
85
|
+
//# sourceMappingURL=performance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"performance.d.ts","sourceRoot":"","sources":["../../../lib/commands/performance.js"],"names":[],"mappings":"AAuBA;;;;;;;;;;;;;;;;;GAiBG;AACH,0FALW,MAAM,gBACN,MAAM,QACN,MAAM,GAAC,SAAS,iBA4C1B;;IA3DD;;;;;;;;;;;;;;;;;OAiBG;IACH,gEALW,MAAM,gBACN,MAAM,QACN,MAAM,GAAC,SAAS,EA4C1B;IADC,2CAAgE;;AAGlE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,4FAdW,MAAM,SACN,MAAM,SACN,MAAM,WACN,OAAO,OAAO,EAAE,MAAM,gBACtB,MAAM,YACN,MAAM,CAAC,MAAM,EAAC,GAAG,CAAC,kBAClB,MAAM,eACN,MAAM,CAAC,MAAM,EAAC,GAAG,CAAC,GAAC,CAAC,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,EAAE,GAElC,OAAO,CAAC,MAAM,CAAC,CAoD3B;AA2BD;IAGE,mDAeC;IAjBD,qDAAqD;IACrD,UADW,GAAiC,GAAC,IAAI,CACxC;IAGP,0BAA2B;IAC3B,cAAoF;IACpF,kBAA4D;IAC5D,oBAGC;IACD,UAAoB;IACpB,WAAiB;IACjB,8CAEC;IACD,wCAA2B;IAG7B,uBAEC;IAED,yCAEC;IAED,uCAsBC;IAED,qBAEC;IAED,uCAgCC;IAED,uBAiGC;IAED,uCAkBC;CACF;6BAGY,OAAO,WAAW,EAAE,cAAc"}
|