agent-device 0.20.10 → 0.21.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/README.md +2 -2
- package/android/ime-helper/dist/{agent-device-android-ime-helper-0.20.10.apk → agent-device-android-ime-helper-0.21.1.apk} +0 -0
- package/android/ime-helper/dist/agent-device-android-ime-helper-0.21.1.apk.sha256 +1 -0
- package/android/ime-helper/dist/{agent-device-android-ime-helper-0.20.10.manifest.json → agent-device-android-ime-helper-0.21.1.manifest.json} +4 -4
- package/android/snapshot-helper/dist/agent-device-android-snapshot-helper-0.21.1.apk +0 -0
- package/android/snapshot-helper/dist/agent-device-android-snapshot-helper-0.21.1.apk.sha256 +1 -0
- package/android/snapshot-helper/dist/{agent-device-android-snapshot-helper-0.20.10.manifest.json → agent-device-android-snapshot-helper-0.21.1.manifest.json} +6 -6
- package/apple/macos-helper/Sources/AgentDeviceMacOSHelper/AudioProbe.swift +35 -33
- package/apple/macos-helper/Sources/AgentDeviceMacOSHelper/main.swift +6 -1
- package/apple/snapshot-bridge/LICENSE.idb +23 -0
- package/apple/snapshot-bridge/README.md +106 -0
- package/apple/snapshot-bridge/SnapshotBridge.m +286 -0
- package/apple/snapshot-bridge/SnapshotBridgeCapture.h +25 -0
- package/apple/snapshot-bridge/SnapshotBridgeCapture.m +138 -0
- package/apple/snapshot-bridge/SnapshotBridgeRuntime.h +34 -0
- package/apple/snapshot-bridge/SnapshotBridgeRuntime.m +411 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunner/AgentDeviceRunnerApp.m +58 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunner.xcodeproj/project.pbxproj +19 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerAXSnapshotBridge.h +12 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerAXSnapshotBridge.m +20 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerAlertVerification.swift +36 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerSelectorMatchPolicy.swift +15 -15
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerStringNormalization.swift +8 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerSynthesizedGesture.h +12 -1
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerSynthesizedGesture.m +100 -6
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerSystemSurfaceHostPolicy.swift +72 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTapPointPolicy.swift +63 -14
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+AXSnapshotFallback.swift +677 -83
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Alert.swift +35 -92
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+AlertObservation.swift +124 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+BlockingSystemModalResolution.swift +39 -4
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+CommandExecution.swift +1058 -213
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+CommandJournal.swift +296 -14
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Environment.swift +1 -1
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Exceptions.swift +10 -10
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Interaction.swift +309 -149
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Keyboard.swift +101 -42
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Lifecycle.swift +24 -17
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Models.swift +124 -199
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Navigation.swift +71 -4
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+PrivateAXElementTypes.swift +12 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+PrivateAXPresentation.swift +211 -78
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+ScreenRecorder.swift +30 -10
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+ScrollGesture.swift +254 -24
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SequenceExecution.swift +206 -22
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Snapshot.swift +465 -494
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotBackendCapabilities.swift +168 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotCapturePlan.swift +802 -247
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotPresentationInvariant.swift +19 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotTiming.swift +185 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SynthesizedCommitDeadline.swift +206 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SynthesizedGesturePolicy.swift +83 -5
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SynthesizedTextEntry.swift +156 -34
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SystemModal.swift +5 -4
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TextEntry.swift +35 -318
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TextEntryFocus.swift +206 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TextEntryReadiness.swift +158 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TextInputCandidatePolicy.swift +28 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TextInputProbe.swift +101 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TextTyping.swift +56 -23
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Transport.swift +56 -27
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TvRemote.swift +30 -24
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests.swift +126 -80
- package/dist/apple/runner/AgentDeviceRunner/RecordingScripts/RecordingExportSupport.swift +111 -0
- package/dist/apple/runner/AgentDeviceRunner/RecordingScripts/recording-overlay.swift +47 -86
- package/dist/apple/runner/AgentDeviceRunner/RecordingScripts/recording-trim.swift +32 -79
- package/dist/apple/snapshot-presentation/Package.swift +21 -0
- package/dist/apple/snapshot-presentation/Sources/AgentDeviceSnapshotPresentation/SnapshotGeometry.swift +56 -0
- package/dist/apple/snapshot-presentation/Sources/AgentDeviceSnapshotPresentation/SnapshotModels.swift +259 -0
- package/dist/apple/snapshot-presentation/Sources/AgentDeviceSnapshotPresentation/SnapshotPresentation.swift +153 -0
- package/dist/apple/snapshot-presentation/Sources/AgentDeviceSnapshotPresentation/SnapshotPresentationFailure.swift +27 -0
- package/dist/apple/snapshot-presentation/Sources/AgentDeviceSnapshotPresentation/SnapshotPresentationInvariant.swift +91 -0
- package/dist/apple/snapshot-presentation/Sources/AgentDeviceSnapshotPresentation/SnapshotPresentationProjection.swift +161 -0
- package/dist/apple/snapshot-presentation/Sources/AgentDeviceSnapshotPresentation/SnapshotScopePolicy.swift +53 -0
- package/dist/apple/snapshot-presentation/Sources/AgentDeviceSnapshotPresentation/SnapshotVisibilityFold.swift +242 -0
- package/dist/apple/snapshot-presentation/Sources/AgentDeviceSnapshotPresentation/SnapshotVisibilityFoldProjection.swift +97 -0
- package/dist/src/adapter.js +1 -0
- package/dist/src/adb-executor.js +2 -0
- package/dist/src/adb-failure.js +1 -0
- package/dist/src/adb-host.js +1 -0
- package/dist/src/adb.js +1 -0
- package/dist/src/agent-browser-lifecycle.js +1 -0
- package/dist/src/agent-browser-process-record.js +1 -0
- package/dist/src/agent-browser-provider.js +1 -0
- package/dist/src/agent-browser-tool.js +1 -1
- package/dist/src/agent-device-client.js +2 -2
- package/dist/src/ai-sdk.d.ts +2 -2
- package/dist/src/ai-sdk.js +1 -1
- package/dist/src/alert-contract.js +1 -0
- package/dist/src/alert-runtime.js +1 -0
- package/dist/src/android-adb.d.ts +27 -19
- package/dist/src/android-adb.js +1 -1
- package/dist/src/android-input-ownership.js +1 -0
- package/dist/src/android-system-chrome.js +1 -0
- package/dist/src/android.js +1 -1
- package/dist/src/api.js +11 -0
- package/dist/src/app-catalog.js +1 -0
- package/dist/src/app-deployment-resolution.js +2 -0
- package/dist/src/app-helpers.js +1 -1
- package/dist/src/app-inventory-contract.js +1 -0
- package/dist/src/app-inventory.js +1 -0
- package/dist/src/app-launch.js +2 -0
- package/dist/src/app-lifecycle-facade.js +1 -0
- package/dist/src/app-lifecycle.js +3 -6
- package/dist/src/app-lifecycle2.js +2 -2
- package/dist/src/app-lifecycle3.js +1 -0
- package/dist/src/app-log-files.js +1 -1
- package/dist/src/app-log-reconnect.js +1 -1
- package/dist/src/app-log-runtime.js +1 -4
- package/dist/src/app-log-runtime2.js +4 -0
- package/dist/src/app-parsers.js +4 -0
- package/dist/src/app-resolution-cache.js +1 -0
- package/dist/src/app-resolution-facade.js +1 -0
- package/dist/src/app-resolution.js +2 -2
- package/dist/src/app-state.js +1 -2
- package/dist/src/apple-runner-platform.js +1 -0
- package/dist/src/application-lifecycle-interaction.js +1 -0
- package/dist/src/application-lifecycle-runtime.js +1 -0
- package/dist/src/apps-simctl.js +1 -0
- package/dist/src/archive.js +4 -0
- package/dist/src/artifact-download.js +1 -0
- package/dist/src/artifacts.d.ts +6 -2
- package/dist/src/artifacts.js +1 -1
- package/dist/src/async-lifecycle.js +1 -0
- package/dist/src/audio-probe-result.js +1 -0
- package/dist/src/audio-probe-runtime.js +1 -0
- package/dist/src/audio-probe-support.js +1 -0
- package/dist/src/auth-session.js +1 -1
- package/dist/src/auth.js +1 -1
- package/dist/src/backend-snapshot-options.js +1 -1
- package/dist/src/{url.js → base-url.js} +1 -1
- package/dist/src/boot-diagnostics.js +2 -2
- package/dist/src/byte-limit-stream.js +1 -1
- package/dist/src/capabilities.js +1 -0
- package/dist/src/capture.js +1 -0
- package/dist/src/catalog.js +1 -0
- package/dist/src/cli-command-aliases.js +1 -0
- package/dist/src/cli-config.js +1 -1
- package/dist/src/cli-help.js +74 -51
- package/dist/src/cli-output.js +1 -1
- package/dist/src/cli-runner.js +1 -1
- package/dist/src/cli.js +4 -6
- package/dist/src/click-button.js +1 -0
- package/dist/src/client-metro-companion.js +1 -0
- package/dist/src/client-metro.js +1 -1
- package/dist/src/client-types.d.ts +280 -242
- package/dist/src/clipboard.js +1 -0
- package/dist/src/code-signature-cache.js +1 -0
- package/dist/src/code-signature.js +1 -0
- package/dist/src/color.js +1 -0
- package/dist/src/command-metadata.js +1 -1
- package/dist/src/command-schema.js +3 -3
- package/dist/src/command-surface.js +1 -1
- package/dist/src/command-tools.js +2 -2
- package/dist/src/command.js +1 -0
- package/dist/src/compatibility-policy.js +1 -0
- package/dist/src/config.js +1 -1
- package/dist/src/config2.js +1 -0
- package/dist/src/connection-runtime.js +1 -1
- package/dist/src/connection.js +5 -5
- package/dist/src/contracts.d.ts +1 -1
- package/dist/src/contracts.js +1 -1
- package/dist/src/daemon-client-lifecycle.js +1 -0
- package/dist/src/daemon-process.js +1 -0
- package/dist/src/daemon-registration.js +1 -0
- package/dist/src/daemon-shutdown-report.js +1 -1
- package/dist/src/daemon.js +2 -2
- package/dist/src/debug-symbols-facade.js +5 -0
- package/dist/src/deploy-result-target.js +1 -0
- package/dist/src/device-claim-inspection.js +1 -1
- package/dist/src/device-claim-rule.js +1 -0
- package/dist/src/device-input-state.d.ts +190 -3
- package/dist/src/device-inventory-context.js +1 -0
- package/dist/src/device-isolation.js +1 -0
- package/dist/src/device-release.js +1 -0
- package/dist/src/device-rotation.js +1 -0
- package/dist/src/device-selection-resolver.js +1 -0
- package/dist/src/device-session.js +1 -0
- package/dist/src/device.js +1 -1
- package/dist/src/device2.js +3 -2
- package/dist/src/diagnostics.js +3 -0
- package/dist/src/diagnostics2.js +1 -0
- package/dist/src/dispatch-resolve.js +1 -0
- package/dist/src/doctor-facade.js +1 -0
- package/dist/src/doctor-output.js +1 -0
- package/dist/src/doctor.js +1 -0
- package/dist/src/doctor2.js +1 -0
- package/dist/src/doctor3.js +1 -0
- package/dist/src/durable-resource.js +1 -0
- package/dist/src/entities.js +1 -1
- package/dist/src/error.js +2 -0
- package/dist/src/exec.js +1 -0
- package/dist/src/file.js +1 -0
- package/dist/src/find.js +1 -1
- package/dist/src/finders.js +1 -1
- package/dist/src/generic-settle.js +1 -1
- package/dist/src/generic.js +1 -1
- package/dist/src/gesture-admission.js +1 -0
- package/dist/src/gesture-plan-types.js +1 -0
- package/dist/src/gesture-plan.js +1 -0
- package/dist/src/gesture-runtime.js +1 -0
- package/dist/src/harmonyos.js +1 -1
- package/dist/src/hdc.js +1 -1
- package/dist/src/helper.js +2 -2
- package/dist/src/host-file.js +1 -0
- package/dist/src/human-control-contract.js +1 -0
- package/dist/src/human-control.js +1 -0
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/input-actions.js +1 -4
- package/dist/src/input-actions2.js +2 -1
- package/dist/src/install-artifact-facade.js +1 -0
- package/dist/src/install-source-network-transport.js +1 -0
- package/dist/src/install-source.d.ts +3 -10
- package/dist/src/install-source2.js +1 -1
- package/dist/src/interaction-positionals.js +1 -0
- package/dist/src/interaction-ref-policy.js +1 -0
- package/dist/src/interaction.js +1 -1
- package/dist/src/interaction2.js +1 -1
- package/dist/src/interactor-operation-catalog.js +1 -0
- package/dist/src/interactor-types.js +1 -0
- package/dist/src/interactor.js +6 -2
- package/dist/src/interactor2.js +1 -1
- package/dist/src/interactors.js +1 -1
- package/dist/src/internal/bin.d.ts +1 -1
- package/dist/src/internal/bin.js +1 -2
- package/dist/src/internal/companion-tunnel.d.ts +1 -1
- package/dist/src/internal/companion-tunnel.js +1 -1
- package/dist/src/internal/daemon.d.ts +1 -1
- package/dist/src/internal/daemon.js +2 -4
- package/dist/src/internal/png-worker.d.ts +4 -4
- package/dist/src/internal/png-worker.js +1 -1
- package/dist/src/internal/run-script-http-child.d.ts +4 -0
- package/dist/src/internal/run-script-http-child.js +1 -0
- package/dist/src/internal/update-check-entry.d.ts +1 -1
- package/dist/src/inventory.js +4 -4
- package/dist/src/inventory2.js +1 -1
- package/dist/src/inventory3.js +1 -1
- package/dist/src/inventory5.js +1 -1
- package/dist/src/inventory6.js +1 -1
- package/dist/src/ios-client.js +16 -0
- package/dist/src/ios-snapshot-acquisition.js +1 -0
- package/dist/src/ios-snapshot-adapter.js +1 -0
- package/dist/src/ios-snapshot-planning.js +1 -0
- package/dist/src/ios-snapshot-runtime.js +1 -0
- package/dist/src/ios-system-surface.js +1 -0
- package/dist/src/json.js +1 -0
- package/dist/src/keyboard-actions.js +1 -0
- package/dist/src/launch-console.js +1 -0
- package/dist/src/lease-context.js +1 -1
- package/dist/src/lease-scope.js +1 -0
- package/dist/src/lease.js +1 -1
- package/dist/src/limrun-runtime-dependencies.js +1 -1
- package/dist/src/limrun.d.ts +1610 -7
- package/dist/src/limrun.js +1 -1
- package/dist/src/linux.js +1 -1
- package/dist/src/local-interactor-operation-set.js +1 -0
- package/dist/src/location-coordinates.js +1 -1
- package/dist/src/logcat.js +1 -1
- package/dist/src/macos-facade.js +1 -0
- package/dist/src/managed-device-scope.js +1 -0
- package/dist/src/mechanics.js +19 -0
- package/dist/src/metro.d.ts +4 -2
- package/dist/src/metro.js +1 -1
- package/dist/src/metro2.js +1 -1
- package/dist/src/mobile-snapshot-semantics.js +1 -1
- package/dist/src/multitouch-support.js +1 -0
- package/dist/src/numeric.js +1 -0
- package/dist/src/observability.js +1 -1
- package/dist/src/observation.js +2 -0
- package/dist/src/open-target-resolution.js +1 -0
- package/dist/src/output-path.js +1 -1
- package/dist/src/owner-identity.js +3 -1
- package/dist/src/parameterized-recorded-fill.js +1 -0
- package/dist/src/parser.js +1 -1
- package/dist/src/perf-facade.js +2 -0
- package/dist/src/perf-process-identity.js +1 -0
- package/dist/src/perf-runtime-operation-builder.js +1 -0
- package/dist/src/perf-runtime-plan.js +1 -0
- package/dist/src/perf-runtime.js +1 -0
- package/dist/src/perf.js +1 -4
- package/dist/src/physical-device-control.js +1 -1
- package/dist/src/physical-device-facade.js +1 -0
- package/dist/src/platform-request-scope.js +1 -0
- package/dist/src/platform-runtime-android-adb-host.js +1 -0
- package/dist/src/platform-runtime-android-mechanics.js +1 -0
- package/dist/src/platform-runtime-app-log-android-transport.js +1 -1
- package/dist/src/platform-runtime-app-log-process.js +1 -1
- package/dist/src/platform-runtime-host.js +1 -1
- package/dist/src/platform-runtime-managed-owner.js +1 -0
- package/dist/src/platform-runtime-network-web-transport.js +1 -1
- package/dist/src/platform-runtime-open-target.js +1 -1
- package/dist/src/platform-runtime-operation-host.js +4 -4
- package/dist/src/platform-runtime-runtime-hints.js +2 -2
- package/dist/src/platform-runtime-screen-recording-android-host.js +1 -1
- package/dist/src/platform-runtime-screen-recording-apple-runner-host.js +1 -1
- package/dist/src/platform-runtime-screen-recording-apple-runner-transport.js +1 -1
- package/dist/src/platform-runtime-screen-recording-apple-simulator-host.js +1 -1
- package/dist/src/platform-runtime-screen-recording-apple-transport.js +1 -1
- package/dist/src/platform-runtime-screen-recording-finalizer-host.js +1 -1
- package/dist/src/platform-runtime-screen-recording-harmony-host.js +1 -1
- package/dist/src/platform-runtime-screen-recording-process-host.js +1 -0
- package/dist/src/platform-runtime-screen-recording-web-host.js +1 -1
- package/dist/src/platform-runtime-unavailable.js +1 -0
- package/dist/src/platform-runtime.js +1 -1
- package/dist/src/platform-runtime2.js +1 -1
- package/dist/src/plist.js +1 -1
- package/dist/src/png-worker-contract.js +1 -1
- package/dist/src/prepare-kind.js +1 -0
- package/dist/src/process-exit.js +1 -1
- package/dist/src/process.js +1 -0
- package/dist/src/provider-device-runtime.js +1 -0
- package/dist/src/provider-session-ownership.js +2 -0
- package/dist/src/provider-webdriver.js +1 -1
- package/dist/src/provider.js +1 -1
- package/dist/src/providers.js +1 -0
- package/dist/src/proxy.js +2 -2
- package/dist/src/react-native-overlay.js +1 -0
- package/dist/src/react-native.js +1 -1
- package/dist/src/record-runtime.js +1 -1
- package/dist/src/record-trace.js +1 -1
- package/dist/src/rect-center.js +1 -0
- package/dist/src/register-builtins.js +1 -0
- package/dist/src/registry.js +40 -28
- package/dist/src/remote-config2.js +1 -1
- package/dist/src/replay-divergence.js +2 -0
- package/dist/src/replay.js +2 -2
- package/dist/src/reporting.js +8 -7
- package/dist/src/request-admission.js +1 -0
- package/dist/src/request-cancel.js +1 -0
- package/dist/src/request-cancellation.js +1 -0
- package/dist/src/request-progress-protocol.js +1 -0
- package/dist/src/request-providers.js +1 -0
- package/dist/src/request-runtime-binding.js +1 -0
- package/dist/src/request.js +1 -0
- package/dist/src/result-serialization.js +1 -0
- package/dist/src/retry.js +1 -0
- package/dist/src/rolldown-runtime.js +1 -1
- package/dist/src/runner-cache-metadata.js +2 -0
- package/dist/src/runner-client.js +1 -1
- package/dist/src/runner-disposal.js +1 -1
- package/dist/src/runner-operations-facade.js +1 -0
- package/dist/src/runner-owner-facade.js +1 -0
- package/dist/src/runner-owner-state.js +1 -0
- package/dist/src/runner-presentation.js +1 -0
- package/dist/src/runner.js +1 -0
- package/dist/src/{runtime-transport.js → runtime-transport-hints.js} +1 -1
- package/dist/src/runtime.js +3 -3
- package/dist/src/runtime2.js +4 -4
- package/dist/src/runtime3.js +1 -1
- package/dist/src/runtime4.js +5 -3
- package/dist/src/runtime5.js +1 -1
- package/dist/src/runtime6.js +1 -1
- package/dist/src/runtime7.js +1 -1
- package/dist/src/runtime8.js +1 -1
- package/dist/src/runtime9.js +1 -1
- package/dist/src/scoped-provider.js +1 -1
- package/dist/src/screen-recording-completion.js +1 -0
- package/dist/src/screen-recording-live-handle.js +1 -0
- package/dist/src/screen-recording-options.js +1 -0
- package/dist/src/screen-recording-resource-recovery.js +1 -0
- package/dist/src/screen-recording-runtime.js +1 -0
- package/dist/src/screenshot-density.js +1 -1
- package/dist/src/screenshot-result.js +1 -6
- package/dist/src/screenshot-runtime.js +1 -0
- package/dist/src/screenshot.js +1 -1
- package/dist/src/screenshot2.js +1 -0
- package/dist/src/screenshot3.js +5 -0
- package/dist/src/script.js +1 -0
- package/dist/src/scroll-command.js +1 -0
- package/dist/src/scroll-gesture.js +1 -0
- package/dist/src/scroll-indicator.js +1 -0
- package/dist/src/sdk-batch-runner.d.ts +23 -6
- package/dist/src/sdk-batch-runner.js +2 -3
- package/dist/src/sdk-batch.js +2 -0
- package/dist/src/sdk-contracts.d.ts +170 -41
- package/dist/src/sdk-contracts.js +2 -2
- package/dist/src/sdk-device.js +1 -1
- package/dist/src/sdk-finders.d.ts +1 -1
- package/dist/src/sdk-finders.js +1 -1
- package/dist/src/sdk-io.js +1 -1
- package/dist/src/sdk-remote-config.d.ts +1 -1
- package/dist/src/sdk-remote-config.js +1 -1
- package/dist/src/sdk-selectors.d.ts +524 -140
- package/dist/src/sdk-selectors.js +1 -1
- package/dist/src/selection.js +1 -0
- package/dist/src/selector-runtime.js +1 -1
- package/dist/src/selectors.js +1 -1
- package/dist/src/semantic-index.js +1 -0
- package/dist/src/server.js +4 -4
- package/dist/src/session-allocation.js +1 -0
- package/dist/src/session-artifact-paths.js +1 -0
- package/dist/src/session-observation.js +1 -0
- package/dist/src/session-paths.js +1 -0
- package/dist/src/session-repair-tombstone.js +1 -0
- package/dist/src/session-routing.js +1 -0
- package/dist/src/session-runtime-admission.js +1 -0
- package/dist/src/session-snapshot.js +1 -0
- package/dist/src/session-store.js +4 -0
- package/dist/src/session-target-evidence.js +1 -1
- package/dist/src/session2.js +5 -27
- package/dist/src/settings.js +1 -0
- package/dist/src/shared.js +2 -2
- package/dist/src/simctl-facade.js +1 -0
- package/dist/src/simctl.js +1 -1
- package/dist/src/simulator-facade.js +1 -0
- package/dist/src/simulator.js +1 -1
- package/dist/src/snapshot-capture-annotations.js +1 -0
- package/dist/src/snapshot-desktop-projection.js +1 -0
- package/dist/src/snapshot-diagnostics.js +1 -0
- package/dist/src/snapshot-process.js +1 -0
- package/dist/src/snapshot-quality-backend-capabilities.js +1 -0
- package/dist/src/snapshot-quality-verdict.js +1 -0
- package/dist/src/snapshot-runtime-binding.js +1 -0
- package/dist/src/snapshot-runtime.js +1 -1
- package/dist/src/snapshot-scope.js +1 -1
- package/dist/src/snapshot-state.js +1 -0
- package/dist/src/snapshot.js +1 -8
- package/dist/src/snapshot2.js +1 -1
- package/dist/src/snapshot3.js +1 -1
- package/dist/src/snapshot4.js +1 -0
- package/dist/src/src.js +1 -1
- package/dist/src/src2.js +1 -1
- package/dist/src/src3.js +1 -2
- package/dist/src/src4.js +1 -1
- package/dist/src/src5.js +1 -0
- package/dist/src/src6.js +1 -0
- package/dist/src/src7.js +2 -0
- package/dist/src/src8.js +115 -0
- package/dist/src/startup-recovery-fence.js +1 -0
- package/dist/src/status-markers.js +1 -0
- package/dist/src/string-enum.js +1 -1
- package/dist/src/success-text.js +1 -0
- package/dist/src/surface-snapshot.js +1 -0
- package/dist/src/surface-snapshot2.js +1 -0
- package/dist/src/takeover.js +5 -0
- package/dist/src/tool-provider-facade.js +1 -0
- package/dist/src/tool-provider.js +4 -3
- package/dist/src/tool-provider2.js +1 -1
- package/dist/src/tool-provider3.js +1 -1
- package/dist/src/toolchain-probe.js +2 -0
- package/dist/src/touch-reference-frame.js +1 -0
- package/dist/src/touch-runtime.js +1 -0
- package/dist/src/transport.js +3 -0
- package/dist/src/tree.js +1 -0
- package/dist/src/ttl-memo.js +1 -0
- package/dist/src/tv-remote.js +1 -0
- package/dist/src/type-text-runtime.js +1 -0
- package/dist/src/undici.js +99 -0
- package/dist/src/update-check.js +1 -1
- package/dist/src/verified-file.js +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/video.js +2 -2
- package/dist/src/web.js +2 -1
- package/dist/src/web2.js +1 -0
- package/dist/src/webdriver-ios-snapshot.js +1 -0
- package/dist/src/webdriver-source.js +1 -0
- package/dist/src/window-state.js +1 -0
- package/linux/atspi-dump.py +54 -9
- package/package.json +58 -35
- package/server.json +9 -3
- package/android/ime-helper/dist/agent-device-android-ime-helper-0.20.10.apk.sha256 +0 -1
- package/android/snapshot-helper/dist/agent-device-android-snapshot-helper-0.20.10.apk +0 -0
- package/android/snapshot-helper/dist/agent-device-android-snapshot-helper-0.20.10.apk.sha256 +0 -1
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+CoordinateTextEntryTests.swift +0 -4
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+FlatSnapshotFiltering.swift +0 -168
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+LifecycleCacheTests.swift +0 -6
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+RecordingTests.swift +0 -4
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SelectorMatchPolicyTests.swift +0 -4
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotPresentation.swift +0 -183
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotPresentationTests.swift +0 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotTraversalIdentityTests.swift +0 -4
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TextEntryPolicyTests.swift +0 -4
- package/dist/src/appearance.js +0 -1
- package/dist/src/apps.js +0 -5
- package/dist/src/audio-probe.js +0 -1
- package/dist/src/cli-grammar.js +0 -1
- package/dist/src/command-catalog.js +0 -1
- package/dist/src/debug-symbols.js +0 -5
- package/dist/src/device-input-state.js +0 -2
- package/dist/src/device-ready.js +0 -1
- package/dist/src/dispatch.js +0 -1
- package/dist/src/handler-utils.js +0 -1
- package/dist/src/helper-package-install.js +0 -1
- package/dist/src/host-process.js +0 -3
- package/dist/src/ime-lifecycle.js +0 -2
- package/dist/src/ime-recovery-marker.js +0 -1
- package/dist/src/input-actions3.js +0 -1
- package/dist/src/install-artifact.js +0 -1
- package/dist/src/install-artifact2.js +0 -1
- package/dist/src/interaction-common.js +0 -1
- package/dist/src/interaction-runtime.js +0 -1
- package/dist/src/interaction-snapshot.js +0 -1
- package/dist/src/manifest.js +0 -1
- package/dist/src/method-scope.js +0 -1
- package/dist/src/png-resize.js +0 -1
- package/dist/src/process-lock.js +0 -1
- package/dist/src/runner-lease.js +0 -1
- package/dist/src/runner-sequence.js +0 -1
- package/dist/src/script-source-bundle.js +0 -16
- package/dist/src/sdk-android-adb.d.ts +0 -245
- package/dist/src/sdk-android-adb.js +0 -4
- package/dist/src/sdk.js +0 -1
- package/dist/src/setting-state.js +0 -1
- package/dist/src/shell-quote.js +0 -1
- package/dist/src/snapshot-session.js +0 -1
- package/dist/src/timing-safe-equal.js +0 -1
- package/dist/src/unsupported-interactor.js +0 -1
- package/dist/src/verdict.js +0 -1
- /package/dist/src/{recording-telemetry.js → telemetry.js} +0 -0
package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Interaction.swift
CHANGED
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
import XCTest
|
|
2
|
+
import AgentDeviceSnapshotPresentation
|
|
2
3
|
|
|
3
4
|
#if os(macOS)
|
|
4
5
|
import CoreGraphics
|
|
5
6
|
#endif
|
|
6
7
|
|
|
8
|
+
private struct RunnerUnsupportedOperationError: LocalizedError {
|
|
9
|
+
let message: String
|
|
10
|
+
|
|
11
|
+
var errorDescription: String? { message }
|
|
12
|
+
}
|
|
13
|
+
|
|
7
14
|
private enum RunnerInterfaceOrientation {
|
|
8
|
-
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
9
18
|
static let portrait = 1
|
|
10
19
|
static let portraitUpsideDown = 2
|
|
11
20
|
static let landscapeRight = 3
|
|
@@ -18,11 +27,18 @@ extension RunnerTests {
|
|
|
18
27
|
case sampled
|
|
19
28
|
}
|
|
20
29
|
|
|
21
|
-
enum SynthesizedDragProfile {
|
|
30
|
+
enum SynthesizedDragProfile: Equatable {
|
|
22
31
|
case continuous
|
|
32
|
+
case controlledScroll
|
|
23
33
|
case fastSwipe
|
|
24
34
|
}
|
|
25
35
|
|
|
36
|
+
func scrollDragProfile(
|
|
37
|
+
releaseBehavior: ScrollReleaseBehavior?
|
|
38
|
+
) -> SynthesizedDragProfile {
|
|
39
|
+
releaseBehavior == .inertial ? .fastSwipe : .controlledScroll
|
|
40
|
+
}
|
|
41
|
+
|
|
26
42
|
struct TouchVisualizationFrame {
|
|
27
43
|
let x: Double
|
|
28
44
|
let y: Double
|
|
@@ -178,11 +194,11 @@ extension RunnerTests {
|
|
|
178
194
|
}
|
|
179
195
|
}
|
|
180
196
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
186
202
|
private func hasTappableFrame(app: XCUIApplication, element: XCUIElement) -> Bool {
|
|
187
203
|
let frame = element.frame
|
|
188
204
|
if frame.isEmpty {
|
|
@@ -191,10 +207,10 @@ extension RunnerTests {
|
|
|
191
207
|
return TapPointPolicy.isAllowed(elementFrame: frame, windowFrame: app.frame)
|
|
192
208
|
}
|
|
193
209
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
|
|
198
214
|
func onScreenWindowFrame(app: XCUIApplication) -> CGRect {
|
|
199
215
|
let window = app.windows.element(boundBy: 0)
|
|
200
216
|
if window.exists {
|
|
@@ -207,11 +223,11 @@ extension RunnerTests {
|
|
|
207
223
|
}
|
|
208
224
|
|
|
209
225
|
func queryElement(app: XCUIApplication, selectorKey: String, selectorValue: String) -> Response {
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
|
|
215
231
|
let match = findElement(
|
|
216
232
|
app: app,
|
|
217
233
|
selectorKey: selectorKey,
|
|
@@ -257,6 +273,23 @@ extension RunnerTests {
|
|
|
257
273
|
)
|
|
258
274
|
}
|
|
259
275
|
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
func smallestElementFirst(_ left: XCUIElement, _ right: XCUIElement) -> Bool {
|
|
279
|
+
let leftArea = max(1, left.frame.width * left.frame.height)
|
|
280
|
+
let rightArea = max(1, right.frame.width * right.frame.height)
|
|
281
|
+
if leftArea != rightArea {
|
|
282
|
+
return leftArea < rightArea
|
|
283
|
+
}
|
|
284
|
+
if left.frame.minY != right.frame.minY {
|
|
285
|
+
return left.frame.minY < right.frame.minY
|
|
286
|
+
}
|
|
287
|
+
if left.frame.minX != right.frame.minX {
|
|
288
|
+
return left.frame.minX < right.frame.minX
|
|
289
|
+
}
|
|
290
|
+
return left.elementType.rawValue < right.elementType.rawValue
|
|
291
|
+
}
|
|
292
|
+
|
|
260
293
|
func readTextAt(app: XCUIApplication, x: Double, y: Double) -> String? {
|
|
261
294
|
let point = CGPoint(x: x, y: y)
|
|
262
295
|
let textInputCandidates = textInputCandidatesAt(app: app, point: point)
|
|
@@ -270,20 +303,7 @@ extension RunnerTests {
|
|
|
270
303
|
.filter { element in
|
|
271
304
|
element.exists && !element.frame.isEmpty && element.frame.contains(point)
|
|
272
305
|
}
|
|
273
|
-
.sorted
|
|
274
|
-
let leftArea = max(1, left.frame.width * left.frame.height)
|
|
275
|
-
let rightArea = max(1, right.frame.width * right.frame.height)
|
|
276
|
-
if leftArea != rightArea {
|
|
277
|
-
return leftArea < rightArea
|
|
278
|
-
}
|
|
279
|
-
if left.frame.minY != right.frame.minY {
|
|
280
|
-
return left.frame.minY < right.frame.minY
|
|
281
|
-
}
|
|
282
|
-
if left.frame.minX != right.frame.minX {
|
|
283
|
-
return left.frame.minX < right.frame.minX
|
|
284
|
-
}
|
|
285
|
-
return left.elementType.rawValue < right.elementType.rawValue
|
|
286
|
-
}
|
|
306
|
+
.sorted(by: smallestElementFirst)
|
|
287
307
|
|
|
288
308
|
for element in candidates where prefersExpandedTextRead(element) {
|
|
289
309
|
if let text = readableText(for: element) {
|
|
@@ -298,50 +318,6 @@ extension RunnerTests {
|
|
|
298
318
|
return nil
|
|
299
319
|
}
|
|
300
320
|
|
|
301
|
-
func textInputAt(app: XCUIApplication, x: Double, y: Double) -> XCUIElement? {
|
|
302
|
-
return textInputCandidatesAt(app: app, point: CGPoint(x: x, y: y)).first
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
private func textInputCandidatesAt(app: XCUIApplication, point: CGPoint) -> [XCUIElement] {
|
|
306
|
-
safely("TEXT_INPUT_AT_POINT", []) {
|
|
307
|
-
// Query the text-input element types directly instead of enumerating the entire tree
|
|
308
|
-
// (app.descendants(.any).allElementsBoundByIndex snapshots every element and is ~10x
|
|
309
|
-
// slower — it dominated fill latency because resolveTextEntryElement re-runs this on
|
|
310
|
-
// each verify/repair poll once the focused field reference goes stale).
|
|
311
|
-
// Prefer the smallest matching field so nested editable controls win over large containers.
|
|
312
|
-
[
|
|
313
|
-
app.textFields,
|
|
314
|
-
app.secureTextFields,
|
|
315
|
-
app.searchFields,
|
|
316
|
-
app.textViews,
|
|
317
|
-
]
|
|
318
|
-
.flatMap { $0.allElementsBoundByIndex }
|
|
319
|
-
.filter { element in
|
|
320
|
-
guard element.exists else { return false }
|
|
321
|
-
let frame = element.frame
|
|
322
|
-
return isCoordinateTextInputCandidate(
|
|
323
|
-
enabled: element.isEnabled,
|
|
324
|
-
frame: frame,
|
|
325
|
-
point: point
|
|
326
|
-
)
|
|
327
|
-
}
|
|
328
|
-
.sorted { left, right in
|
|
329
|
-
let leftArea = max(1, left.frame.width * left.frame.height)
|
|
330
|
-
let rightArea = max(1, right.frame.width * right.frame.height)
|
|
331
|
-
if leftArea != rightArea {
|
|
332
|
-
return leftArea < rightArea
|
|
333
|
-
}
|
|
334
|
-
if left.frame.minY != right.frame.minY {
|
|
335
|
-
return left.frame.minY < right.frame.minY
|
|
336
|
-
}
|
|
337
|
-
if left.frame.minX != right.frame.minX {
|
|
338
|
-
return left.frame.minX < right.frame.minX
|
|
339
|
-
}
|
|
340
|
-
return left.elementType.rawValue < right.elementType.rawValue
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
|
|
345
321
|
private func readableText(for element: XCUIElement) -> String? {
|
|
346
322
|
let label = element.label.trimmingCharacters(in: .whitespacesAndNewlines)
|
|
347
323
|
let identifier = element.identifier.trimmingCharacters(in: .whitespacesAndNewlines)
|
|
@@ -368,16 +344,6 @@ extension RunnerTests {
|
|
|
368
344
|
}
|
|
369
345
|
}
|
|
370
346
|
|
|
371
|
-
func findScopeElement(app: XCUIApplication, scope: String) -> XCUIElement? {
|
|
372
|
-
let predicate = NSPredicate(
|
|
373
|
-
format: "label CONTAINS[c] %@ OR identifier CONTAINS[c] %@",
|
|
374
|
-
scope,
|
|
375
|
-
scope
|
|
376
|
-
)
|
|
377
|
-
let element = app.descendants(matching: .any).matching(predicate).firstMatch
|
|
378
|
-
return element.exists ? element : nil
|
|
379
|
-
}
|
|
380
|
-
|
|
381
347
|
func tapAt(app: XCUIApplication, x: Double, y: Double) -> RunnerInteractionOutcome {
|
|
382
348
|
if let outcome = selectFocusedTvElement(app: app, point: CGPoint(x: x, y: y), action: "tap") {
|
|
383
349
|
return outcome
|
|
@@ -394,30 +360,14 @@ extension RunnerTests {
|
|
|
394
360
|
case "secondary":
|
|
395
361
|
coordinate.rightClick()
|
|
396
362
|
case "middle":
|
|
397
|
-
throw
|
|
398
|
-
domain: "AgentDeviceRunner",
|
|
399
|
-
code: 1,
|
|
400
|
-
userInfo: [NSLocalizedDescriptionKey: "middle mouse button is not supported"]
|
|
401
|
-
)
|
|
363
|
+
throw RunnerUnsupportedOperationError(message: "middle mouse button is not supported")
|
|
402
364
|
default:
|
|
403
|
-
throw
|
|
404
|
-
domain: "AgentDeviceRunner",
|
|
405
|
-
code: 1,
|
|
406
|
-
userInfo: [NSLocalizedDescriptionKey: "unsupported mouse button: \(button)"]
|
|
407
|
-
)
|
|
365
|
+
throw RunnerUnsupportedOperationError(message: "unsupported mouse button: \(button)")
|
|
408
366
|
}
|
|
409
367
|
#elseif os(tvOS)
|
|
410
|
-
throw
|
|
411
|
-
domain: "AgentDeviceRunner",
|
|
412
|
-
code: 1,
|
|
413
|
-
userInfo: [NSLocalizedDescriptionKey: "mouseClick is not supported on tvOS"]
|
|
414
|
-
)
|
|
368
|
+
throw RunnerUnsupportedOperationError(message: "mouseClick is not supported on tvOS")
|
|
415
369
|
#else
|
|
416
|
-
throw
|
|
417
|
-
domain: "AgentDeviceRunner",
|
|
418
|
-
code: 1,
|
|
419
|
-
userInfo: [NSLocalizedDescriptionKey: "mouseClick is only supported on macOS"]
|
|
420
|
-
)
|
|
370
|
+
throw RunnerUnsupportedOperationError(message: "mouseClick is only supported on macOS")
|
|
421
371
|
#endif
|
|
422
372
|
}
|
|
423
373
|
|
|
@@ -425,28 +375,22 @@ extension RunnerTests {
|
|
|
425
375
|
app: XCUIApplication,
|
|
426
376
|
x: Double,
|
|
427
377
|
y: Double,
|
|
428
|
-
direction:
|
|
378
|
+
direction: RunnerScrollDirection,
|
|
429
379
|
pixels: Double,
|
|
430
380
|
durationMs: Double?
|
|
431
381
|
) throws {
|
|
432
382
|
#if os(macOS)
|
|
433
|
-
|
|
383
|
+
let events = desktopScrollWheelDeltaEvents(
|
|
434
384
|
direction: direction,
|
|
435
385
|
pixels: pixels,
|
|
436
386
|
durationMs: durationMs
|
|
437
|
-
)
|
|
438
|
-
throw NSError(
|
|
439
|
-
domain: "AgentDeviceRunner",
|
|
440
|
-
code: 1,
|
|
441
|
-
userInfo: [NSLocalizedDescriptionKey: "unsupported desktop scroll direction: \(direction)"]
|
|
442
|
-
)
|
|
443
|
-
}
|
|
387
|
+
)
|
|
444
388
|
|
|
445
389
|
let coordinate = interactionCoordinate(app: app, x: x, y: y)
|
|
446
390
|
let interval = desktopScrollEventIntervalSeconds(durationMs: durationMs, eventCount: events.count)
|
|
447
391
|
for (index, deltas) in events.enumerated() {
|
|
448
|
-
|
|
449
|
-
|
|
392
|
+
|
|
393
|
+
|
|
450
394
|
coordinate.scroll(
|
|
451
395
|
byDeltaX: CGFloat(deltas.horizontal),
|
|
452
396
|
deltaY: CGFloat(deltas.vertical)
|
|
@@ -456,44 +400,35 @@ extension RunnerTests {
|
|
|
456
400
|
}
|
|
457
401
|
}
|
|
458
402
|
#elseif os(tvOS)
|
|
459
|
-
throw
|
|
460
|
-
domain: "AgentDeviceRunner",
|
|
461
|
-
code: 1,
|
|
462
|
-
userInfo: [NSLocalizedDescriptionKey: "desktopScroll is not supported on tvOS"]
|
|
463
|
-
)
|
|
403
|
+
throw RunnerUnsupportedOperationError(message: "desktopScroll is not supported on tvOS")
|
|
464
404
|
#else
|
|
465
|
-
throw
|
|
466
|
-
domain: "AgentDeviceRunner",
|
|
467
|
-
code: 1,
|
|
468
|
-
userInfo: [NSLocalizedDescriptionKey: "desktopScroll is only supported on macOS"]
|
|
469
|
-
)
|
|
405
|
+
throw RunnerUnsupportedOperationError(message: "desktopScroll is only supported on macOS")
|
|
470
406
|
#endif
|
|
471
407
|
}
|
|
472
408
|
|
|
473
|
-
func desktopScrollWheelDeltas(
|
|
409
|
+
func desktopScrollWheelDeltas(
|
|
410
|
+
direction: RunnerScrollDirection,
|
|
411
|
+
pixels: Double
|
|
412
|
+
) -> (vertical: Int32, horizontal: Int32) {
|
|
474
413
|
let magnitude = Int32(max(1, min(Double(Int32.max), pixels.rounded())))
|
|
475
414
|
switch direction {
|
|
476
|
-
case
|
|
415
|
+
case .up:
|
|
477
416
|
return (vertical: magnitude, horizontal: 0)
|
|
478
|
-
case
|
|
417
|
+
case .down:
|
|
479
418
|
return (vertical: -magnitude, horizontal: 0)
|
|
480
|
-
case
|
|
419
|
+
case .left:
|
|
481
420
|
return (vertical: 0, horizontal: magnitude)
|
|
482
|
-
case
|
|
421
|
+
case .right:
|
|
483
422
|
return (vertical: 0, horizontal: -magnitude)
|
|
484
|
-
default:
|
|
485
|
-
return nil
|
|
486
423
|
}
|
|
487
424
|
}
|
|
488
425
|
|
|
489
426
|
func desktopScrollWheelDeltaEvents(
|
|
490
|
-
direction:
|
|
427
|
+
direction: RunnerScrollDirection,
|
|
491
428
|
pixels: Double,
|
|
492
429
|
durationMs: Double?
|
|
493
|
-
) -> [(vertical: Int32, horizontal: Int32)]
|
|
494
|
-
|
|
495
|
-
return nil
|
|
496
|
-
}
|
|
430
|
+
) -> [(vertical: Int32, horizontal: Int32)] {
|
|
431
|
+
let totalDeltas = desktopScrollWheelDeltas(direction: direction, pixels: pixels)
|
|
497
432
|
let magnitude = max(abs(Int(totalDeltas.vertical)), abs(Int(totalDeltas.horizontal)))
|
|
498
433
|
let duration = max(0, durationMs ?? 0)
|
|
499
434
|
let requestedEventCount = duration > 0 ? Int(ceil(duration / 16.0)) : 1
|
|
@@ -550,7 +485,7 @@ extension RunnerTests {
|
|
|
550
485
|
y2: Double,
|
|
551
486
|
holdDuration: TimeInterval
|
|
552
487
|
) -> RunnerInteractionOutcome {
|
|
553
|
-
|
|
488
|
+
|
|
554
489
|
let dx = x2 - x
|
|
555
490
|
let dy = y2 - y
|
|
556
491
|
let button: TvRemoteButton = abs(dx) > abs(dy)
|
|
@@ -562,9 +497,9 @@ extension RunnerTests {
|
|
|
562
497
|
return performCoordinateDrag(app: app, x: x, y: y, x2: x2, y2: y2, holdDuration: holdDuration)
|
|
563
498
|
}
|
|
564
499
|
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
|
|
568
503
|
func nativeSynthesizedPoint(
|
|
569
504
|
orientedX x: Double,
|
|
570
505
|
orientedY y: Double,
|
|
@@ -582,13 +517,13 @@ extension RunnerTests {
|
|
|
582
517
|
return CGPoint(x: localY, y: width - localX)
|
|
583
518
|
case RunnerInterfaceOrientation.portraitUpsideDown:
|
|
584
519
|
return CGPoint(x: width - localX, y: height - localY)
|
|
585
|
-
default:
|
|
520
|
+
default:
|
|
586
521
|
return CGPoint(x: localX, y: localY)
|
|
587
522
|
}
|
|
588
523
|
}
|
|
589
524
|
|
|
590
|
-
|
|
591
|
-
|
|
525
|
+
|
|
526
|
+
|
|
592
527
|
func nativeSynthesizedVector(
|
|
593
528
|
orientedDx dx: Double,
|
|
594
529
|
orientedDy dy: Double,
|
|
@@ -601,7 +536,7 @@ extension RunnerTests {
|
|
|
601
536
|
return CGVector(dx: dy, dy: -dx)
|
|
602
537
|
case RunnerInterfaceOrientation.portraitUpsideDown:
|
|
603
538
|
return CGVector(dx: -dx, dy: -dy)
|
|
604
|
-
default:
|
|
539
|
+
default:
|
|
605
540
|
return CGVector(dx: dx, dy: dy)
|
|
606
541
|
}
|
|
607
542
|
}
|
|
@@ -646,6 +581,15 @@ extension RunnerTests {
|
|
|
646
581
|
y2: Double(end.y),
|
|
647
582
|
durationMs: durationMs
|
|
648
583
|
)
|
|
584
|
+
case .controlledScroll:
|
|
585
|
+
RunnerSynthesizedGesture.synthesizeControlledScroll(
|
|
586
|
+
withApplication: app,
|
|
587
|
+
x: Double(start.x),
|
|
588
|
+
y: Double(start.y),
|
|
589
|
+
x2: Double(end.x),
|
|
590
|
+
y2: Double(end.y),
|
|
591
|
+
durationMs: durationMs
|
|
592
|
+
)
|
|
649
593
|
case .fastSwipe:
|
|
650
594
|
RunnerSynthesizedGesture.synthesizeSwipe(
|
|
651
595
|
withApplication: app,
|
|
@@ -938,8 +882,8 @@ extension RunnerTests {
|
|
|
938
882
|
screenshotSize: CGSize,
|
|
939
883
|
interfaceOrientation: Int
|
|
940
884
|
) -> CGRect? {
|
|
941
|
-
|
|
942
|
-
|
|
885
|
+
|
|
886
|
+
|
|
943
887
|
guard screenshotSize.width.isFinite, screenshotSize.height.isFinite,
|
|
944
888
|
screenshotSize.width > 0,
|
|
945
889
|
screenshotSize.height > 0
|
|
@@ -1113,8 +1057,8 @@ extension RunnerTests {
|
|
|
1113
1057
|
) -> RunnerInteractionOutcome {
|
|
1114
1058
|
#if os(iOS)
|
|
1115
1059
|
let orientation = Int(RunnerSynthesizedGesture.interfaceOrientation(forApplication: app))
|
|
1116
|
-
|
|
1117
|
-
|
|
1060
|
+
|
|
1061
|
+
|
|
1118
1062
|
let frame = CGRect(
|
|
1119
1063
|
x: plan.viewport.x,
|
|
1120
1064
|
y: plan.viewport.y,
|
|
@@ -1245,4 +1189,220 @@ extension RunnerTests {
|
|
|
1245
1189
|
}
|
|
1246
1190
|
#endif
|
|
1247
1191
|
|
|
1192
|
+
|
|
1193
|
+
|
|
1194
|
+
|
|
1195
|
+
|
|
1196
|
+
|
|
1197
|
+
|
|
1198
|
+
|
|
1199
|
+
|
|
1200
|
+
|
|
1201
|
+
|
|
1202
|
+
|
|
1203
|
+
|
|
1204
|
+
|
|
1205
|
+
|
|
1206
|
+
|
|
1207
|
+
|
|
1208
|
+
|
|
1209
|
+
|
|
1210
|
+
|
|
1211
|
+
|
|
1212
|
+
|
|
1213
|
+
|
|
1214
|
+
|
|
1215
|
+
|
|
1216
|
+
|
|
1217
|
+
|
|
1218
|
+
|
|
1219
|
+
|
|
1220
|
+
|
|
1221
|
+
|
|
1222
|
+
|
|
1223
|
+
|
|
1224
|
+
|
|
1225
|
+
|
|
1226
|
+
|
|
1227
|
+
|
|
1228
|
+
|
|
1229
|
+
|
|
1230
|
+
|
|
1231
|
+
|
|
1232
|
+
|
|
1233
|
+
|
|
1234
|
+
|
|
1235
|
+
|
|
1236
|
+
|
|
1237
|
+
|
|
1238
|
+
|
|
1239
|
+
|
|
1240
|
+
|
|
1241
|
+
|
|
1242
|
+
|
|
1243
|
+
|
|
1244
|
+
|
|
1245
|
+
|
|
1246
|
+
|
|
1247
|
+
|
|
1248
|
+
|
|
1249
|
+
|
|
1250
|
+
|
|
1251
|
+
|
|
1252
|
+
|
|
1253
|
+
|
|
1254
|
+
|
|
1255
|
+
|
|
1256
|
+
|
|
1257
|
+
|
|
1258
|
+
|
|
1259
|
+
|
|
1260
|
+
|
|
1261
|
+
|
|
1262
|
+
|
|
1263
|
+
|
|
1264
|
+
|
|
1265
|
+
|
|
1266
|
+
|
|
1267
|
+
|
|
1268
|
+
|
|
1269
|
+
|
|
1270
|
+
|
|
1271
|
+
|
|
1272
|
+
|
|
1273
|
+
|
|
1274
|
+
|
|
1275
|
+
|
|
1276
|
+
|
|
1277
|
+
|
|
1278
|
+
|
|
1279
|
+
|
|
1280
|
+
|
|
1281
|
+
|
|
1282
|
+
|
|
1283
|
+
|
|
1284
|
+
|
|
1285
|
+
|
|
1286
|
+
|
|
1287
|
+
|
|
1288
|
+
|
|
1289
|
+
|
|
1290
|
+
|
|
1291
|
+
|
|
1292
|
+
|
|
1293
|
+
|
|
1294
|
+
|
|
1295
|
+
|
|
1296
|
+
|
|
1297
|
+
|
|
1298
|
+
|
|
1299
|
+
|
|
1300
|
+
|
|
1301
|
+
|
|
1302
|
+
|
|
1303
|
+
|
|
1304
|
+
|
|
1305
|
+
|
|
1306
|
+
|
|
1307
|
+
|
|
1308
|
+
|
|
1309
|
+
|
|
1310
|
+
|
|
1311
|
+
|
|
1312
|
+
|
|
1313
|
+
|
|
1314
|
+
|
|
1315
|
+
|
|
1316
|
+
|
|
1317
|
+
|
|
1318
|
+
|
|
1319
|
+
|
|
1320
|
+
|
|
1321
|
+
|
|
1322
|
+
|
|
1323
|
+
|
|
1324
|
+
|
|
1325
|
+
|
|
1326
|
+
|
|
1327
|
+
|
|
1328
|
+
|
|
1329
|
+
|
|
1330
|
+
|
|
1331
|
+
|
|
1332
|
+
|
|
1333
|
+
|
|
1334
|
+
|
|
1335
|
+
|
|
1336
|
+
|
|
1337
|
+
|
|
1338
|
+
|
|
1339
|
+
|
|
1340
|
+
|
|
1341
|
+
|
|
1342
|
+
|
|
1343
|
+
|
|
1344
|
+
|
|
1345
|
+
|
|
1346
|
+
|
|
1347
|
+
|
|
1348
|
+
|
|
1349
|
+
|
|
1350
|
+
|
|
1351
|
+
|
|
1352
|
+
|
|
1353
|
+
|
|
1354
|
+
|
|
1355
|
+
|
|
1356
|
+
|
|
1357
|
+
|
|
1358
|
+
|
|
1359
|
+
|
|
1360
|
+
|
|
1361
|
+
|
|
1362
|
+
|
|
1363
|
+
|
|
1364
|
+
|
|
1365
|
+
|
|
1366
|
+
|
|
1367
|
+
|
|
1368
|
+
|
|
1369
|
+
|
|
1370
|
+
|
|
1371
|
+
|
|
1372
|
+
|
|
1373
|
+
|
|
1374
|
+
|
|
1375
|
+
|
|
1376
|
+
|
|
1377
|
+
|
|
1378
|
+
|
|
1379
|
+
|
|
1380
|
+
|
|
1381
|
+
|
|
1382
|
+
|
|
1383
|
+
|
|
1384
|
+
|
|
1385
|
+
|
|
1386
|
+
|
|
1387
|
+
|
|
1388
|
+
|
|
1389
|
+
|
|
1390
|
+
|
|
1391
|
+
|
|
1392
|
+
|
|
1393
|
+
|
|
1394
|
+
|
|
1395
|
+
|
|
1396
|
+
|
|
1397
|
+
|
|
1398
|
+
|
|
1399
|
+
|
|
1400
|
+
|
|
1401
|
+
|
|
1402
|
+
|
|
1403
|
+
|
|
1404
|
+
|
|
1405
|
+
|
|
1406
|
+
|
|
1407
|
+
|
|
1248
1408
|
}
|