agent-device 0.21.0 → 0.21.2
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/android/ime-helper/dist/{agent-device-android-ime-helper-0.21.0.apk → agent-device-android-ime-helper-0.21.2.apk} +0 -0
- package/android/ime-helper/dist/agent-device-android-ime-helper-0.21.2.apk.sha256 +1 -0
- package/android/ime-helper/dist/{agent-device-android-ime-helper-0.21.0.manifest.json → agent-device-android-ime-helper-0.21.2.manifest.json} +4 -4
- package/android/snapshot-helper/dist/agent-device-android-snapshot-helper-0.21.2.apk +0 -0
- package/android/snapshot-helper/dist/agent-device-android-snapshot-helper-0.21.2.apk.sha256 +1 -0
- package/android/snapshot-helper/dist/{agent-device-android-snapshot-helper-0.21.0.manifest.json → agent-device-android-snapshot-helper-0.21.2.manifest.json} +6 -6
- package/apple/snapshot-bridge/README.md +58 -1
- package/apple/snapshot-bridge/SnapshotBridge.m +6 -0
- package/apple/snapshot-bridge/SnapshotBridgeCapture.h +25 -0
- package/apple/snapshot-bridge/SnapshotBridgeCapture.m +138 -0
- package/apple/snapshot-bridge/SnapshotBridgeRuntime.h +1 -0
- package/apple/snapshot-bridge/SnapshotBridgeRuntime.m +32 -3
- 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/RunnerScrollViewportPolicy.swift +413 -0
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerSelectorMatchPolicy.swift +15 -15
- 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 +668 -82
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Alert.swift +48 -4
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+BlockingSystemModalResolution.swift +39 -4
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+CommandExecution.swift +1078 -211
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+CommandJournal.swift +290 -0
- 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 +250 -74
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Keyboard.swift +101 -42
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Lifecycle.swift +13 -13
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Models.swift +55 -43
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Navigation.swift +71 -4
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+PrivateAXPresentation.swift +144 -7
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+ScreenRecorder.swift +13 -1
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+ScrollGesture.swift +216 -17
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SequenceExecution.swift +206 -22
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Snapshot.swift +289 -42
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotBackendCapabilities.swift +92 -22
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotCapturePlan.swift +617 -122
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotTiming.swift +79 -4
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SynthesizedCommitDeadline.swift +71 -71
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SynthesizedGesturePolicy.swift +92 -6
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SynthesizedTextEntry.swift +67 -67
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SystemModal.swift +4 -4
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TextEntry.swift +17 -17
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TextEntryFocus.swift +30 -30
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TextEntryReadiness.swift +31 -31
- 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 +19 -19
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Transport.swift +55 -17
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TvRemote.swift +26 -5
- package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests.swift +126 -75
- package/dist/apple/runner/AgentDeviceRunner/RecordingScripts/RecordingExportSupport.swift +8 -12
- package/dist/apple/runner/AgentDeviceRunner/RecordingScripts/recording-overlay.swift +9 -9
- package/dist/src/absence-observation-errors.js +1 -0
- package/dist/src/adapter.js +1 -1
- package/dist/src/adb-executor.js +1 -1
- package/dist/src/adb-failure.js +1 -1
- package/dist/src/agent-browser-lifecycle.js +1 -1
- package/dist/src/agent-browser-process-record.js +1 -1
- package/dist/src/agent-browser-provider.js +1 -1
- 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 +1 -1
- package/dist/src/ai-sdk.js +1 -1
- package/dist/src/alert-runtime.js +1 -1
- package/dist/src/android-input-ownership.js +1 -1
- package/dist/src/app-catalog.js +1 -1
- package/dist/src/app-deployment-resolution.js +1 -1
- package/dist/src/app-helpers.js +1 -1
- package/dist/src/app-inventory-contract.js +1 -1
- package/dist/src/app-inventory.js +1 -1
- package/dist/src/app-launch.js +2 -2
- package/dist/src/app-lifecycle.js +3 -3
- package/dist/src/app-lifecycle2.js +1 -1
- package/dist/src/app-log-files.js +1 -1
- package/dist/src/app-log-runtime2.js +3 -3
- package/dist/src/app-resolution.js +1 -1
- package/dist/src/apple-runner-platform.js +1 -0
- package/dist/src/application-lifecycle-interaction.js +1 -1
- package/dist/src/archive.js +1 -1
- package/dist/src/artifact-download.js +1 -1
- package/dist/src/auth-session.js +1 -1
- package/dist/src/auth.js +1 -1
- package/dist/src/back-mode.js +1 -1
- package/dist/src/backend-snapshot-options.js +1 -1
- package/dist/src/boot-diagnostics.js +1 -1
- package/dist/src/browser-launch.js +1 -0
- package/dist/src/capture.js +1 -1
- package/dist/src/catalog.js +1 -1
- package/dist/src/cli-config.js +1 -1
- package/dist/src/cli-help.js +30 -26
- package/dist/src/cli.js +4 -4
- package/dist/src/click-button.js +1 -1
- package/dist/src/client-metro-companion.js +1 -1
- package/dist/src/client-metro.js +1 -1
- package/dist/src/client-types.d.ts +28 -13
- package/dist/src/code-signature-cache.js +1 -1
- package/dist/src/code-signature.js +1 -1
- package/dist/src/command-metadata.js +1 -1
- package/dist/src/command-schema.js +3 -3
- package/dist/src/command-tools.js +2 -2
- package/dist/src/command.js +1 -1
- package/dist/src/config.js +1 -1
- package/dist/src/connection-runtime.js +1 -1
- package/dist/src/connection.js +3 -3
- package/dist/src/contracts.d.ts +1 -1
- package/dist/src/contracts.js +1 -1
- package/dist/src/daemon-client-lifecycle.js +1 -1
- package/dist/src/daemon-process.js +1 -1
- package/dist/src/daemon-shutdown-report.js +1 -1
- package/dist/src/daemon.js +1 -1
- package/dist/src/debug-symbols-facade.js +1 -1
- package/dist/src/device-boot.js +1 -0
- package/dist/src/device-claim-inspection.js +1 -1
- package/dist/src/device-claim-rule.js +1 -1
- package/dist/src/device-input-state.d.ts +1 -1
- package/dist/src/device-inventory-context.js +1 -1
- package/dist/src/device-rotation.js +1 -1
- package/dist/src/device-selection-resolver.js +1 -1
- package/dist/src/device-session.js +1 -1
- package/dist/src/device2.js +1 -1
- package/dist/src/diagnostics.js +1 -1
- package/dist/src/dispatch-resolve.js +1 -1
- package/dist/src/doctor2.js +1 -1
- package/dist/src/durable-resource.js +1 -1
- package/dist/src/engine-eval-script.js +1 -0
- package/dist/src/error.js +1 -1
- package/dist/src/exec.js +1 -1
- package/dist/src/file.js +1 -1
- package/dist/src/find.js +1 -1
- package/dist/src/finders.js +1 -1
- package/dist/src/format.js +1 -2
- package/dist/src/generic-settle.js +1 -1
- package/dist/src/gesture-plan.js +1 -1
- package/dist/src/gesture-runtime.js +1 -1
- package/dist/src/harmonyos.js +1 -1
- package/dist/src/hdc.js +1 -1
- package/dist/src/helper.js +2 -2
- package/dist/src/human-control-contract.js +1 -1
- package/dist/src/human-control.js +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/input-actions.js +1 -1
- package/dist/src/input-actions2.js +2 -2
- package/dist/src/install-artifact-facade.js +1 -1
- package/dist/src/install-source-network-transport.js +1 -1
- package/dist/src/install-source2.js +1 -1
- package/dist/src/interaction-positionals.js +1 -1
- package/dist/src/interaction-ref-policy.js +1 -1
- package/dist/src/interaction.js +1 -1
- package/dist/src/interaction2.js +1 -1
- package/dist/src/interactor.js +5 -5
- package/dist/src/interactor2.js +1 -1
- package/dist/src/interactors.js +1 -1
- package/dist/src/internal/bin.js +1 -1
- package/dist/src/internal/daemon.js +2 -2
- package/dist/src/internal/png-worker.d.ts +3 -0
- package/dist/src/internal/png-worker.js +1 -1
- package/dist/src/internal/run-script-http-child.js +1 -1
- package/dist/src/inventory.js +2 -2
- package/dist/src/inventory2.js +1 -1
- package/dist/src/inventory3.js +1 -1
- package/dist/src/inventory5.js +1 -1
- package/dist/src/ios-snapshot-acquisition.js +1 -1
- package/dist/src/ios-snapshot-planning.js +1 -1
- package/dist/src/ios-snapshot-runtime.js +1 -1
- package/dist/src/ios-system-surface.js +1 -0
- package/dist/src/lease-scope.js +1 -1
- package/dist/src/lease.js +1 -1
- package/dist/src/limrun-runtime-dependencies.js +1 -1
- package/dist/src/limrun.d.ts +1 -1
- package/dist/src/linux.js +1 -1
- package/dist/src/local-interactor-operation-set.js +1 -1
- package/dist/src/location-coordinates.js +1 -1
- package/dist/src/managed-device-scope.js +1 -1
- package/dist/src/mechanics.js +16 -16
- package/dist/src/mobile-snapshot-semantics.js +1 -1
- package/dist/src/mp4-atoms.js +1 -0
- package/dist/src/multitouch-support.js +1 -1
- package/dist/src/observation.js +1 -1
- package/dist/src/open-target-resolution.js +1 -0
- package/dist/src/owner-identity.js +3 -3
- package/dist/src/parameterized-recorded-fill.js +1 -1
- package/dist/src/perf-facade.js +2 -2
- package/dist/src/perf-process-identity.js +1 -0
- package/dist/src/perf-runtime-operation-builder.js +1 -1
- package/dist/src/perf-runtime-plan.js +1 -1
- package/dist/src/perf.js +1 -1
- package/dist/src/physical-device-control.js +1 -1
- package/dist/src/platform-request-scope.js +1 -1
- package/dist/src/platform-runtime-android-adb-host.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 -1
- package/dist/src/platform-runtime-open-target.js +1 -1
- package/dist/src/platform-runtime-operation-host.js +2 -2
- 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-finalizer-host.js +1 -1
- package/dist/src/platform-runtime-screen-recording-process-host.js +1 -1
- package/dist/src/platform-runtime-unavailable.js +1 -1
- package/dist/src/platform-runtime.js +1 -1
- package/dist/src/platform-runtime2.js +1 -1
- package/dist/src/png-crop-bytes.js +1 -0
- package/dist/src/png-worker-contract.js +1 -1
- package/dist/src/png.js +1 -0
- package/dist/src/prepare-kind.js +1 -1
- package/dist/src/process.js +1 -1
- package/dist/src/provider-device-runtime.js +1 -1
- package/dist/src/provider-session-ownership.js +1 -1
- package/dist/src/provider-webdriver.js +1 -1
- package/dist/src/proxy.js +1 -1
- package/dist/src/quality-warnings.js +1 -0
- package/dist/src/react-native.js +1 -1
- package/dist/src/record-runtime.js +1 -1
- package/dist/src/rect-center.js +1 -1
- package/dist/src/register-builtins.js +1 -1
- package/dist/src/registry.js +36 -36
- package/dist/src/remote-config2.js +1 -1
- package/dist/src/replay-divergence.js +1 -1
- package/dist/src/replay.js +2 -2
- package/dist/src/reporting.js +9 -8
- package/dist/src/request-admission.js +1 -1
- package/dist/src/request-cancel.js +1 -1
- package/dist/src/request-cancellation.js +1 -1
- package/dist/src/request-runtime-binding.js +1 -1
- package/dist/src/retry.js +1 -1
- package/dist/src/runner-cache-metadata.js +2 -2
- package/dist/src/runner-client.js +1 -1
- package/dist/src/runner-disposal.js +1 -1
- package/dist/src/runner-operations-facade.js +1 -1
- package/dist/src/runner-presentation.js +1 -1
- package/dist/src/runner.js +1 -1
- package/dist/src/runtime-transport-hints.js +1 -1
- package/dist/src/runtime.js +3 -3
- package/dist/src/runtime10.js +1 -0
- package/dist/src/runtime2.js +4 -4
- package/dist/src/runtime3.js +1 -1
- package/dist/src/runtime4.js +5 -4
- 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/screen-recording-live-handle.js +1 -1
- package/dist/src/screen-recording-options.js +1 -1
- package/dist/src/screen-recording-resource-recovery.js +1 -1
- package/dist/src/screenshot-density.js +1 -1
- package/dist/src/screenshot-runtime.js +1 -1
- package/dist/src/screenshot.js +1 -1
- package/dist/src/screenshot3.js +3 -3
- package/dist/src/script.js +1 -1
- package/dist/src/scroll-command.js +1 -1
- package/dist/src/scroll-gesture.js +1 -1
- package/dist/src/sdk-batch-runner.js +2 -2
- package/dist/src/sdk-batch.js +2 -2
- package/dist/src/sdk-contracts.d.ts +69 -26
- 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 +80 -16
- package/dist/src/sdk-selectors.js +1 -1
- package/dist/src/selection.js +0 -0
- package/dist/src/selector-runtime.js +1 -1
- package/dist/src/selectors.js +1 -1
- package/dist/src/semantic-index.js +1 -1
- package/dist/src/server.js +3 -3
- package/dist/src/session-allocation.js +1 -1
- package/dist/src/session-observation.js +1 -0
- package/dist/src/session-routing.js +1 -1
- package/dist/src/session-runtime-admission.js +1 -1
- package/dist/src/session-snapshot.js +1 -1
- package/dist/src/session-store.js +3 -3
- package/dist/src/session-target-evidence.js +1 -1
- package/dist/src/session2.js +5 -5
- package/dist/src/settings.js +1 -1
- package/dist/src/simulator-boot.js +3 -0
- package/dist/src/simulator.js +1 -1
- package/dist/src/snapshot-quality-backend-capabilities.js +1 -1
- package/dist/src/snapshot-runtime-binding.js +1 -1
- package/dist/src/snapshot-runtime.js +1 -1
- package/dist/src/snapshot-state.js +1 -1
- package/dist/src/snapshot2.js +1 -1
- package/dist/src/snapshot3.js +1 -1
- package/dist/src/snapshot4.js +1 -1
- package/dist/src/src.js +1 -1
- package/dist/src/src7.js +2 -2
- package/dist/src/src8.js +2 -2
- package/dist/src/string-enum.js +1 -1
- package/dist/src/takeover.js +1 -1
- package/dist/src/telemetry.js +1 -1
- package/dist/src/tool-provider.js +2 -2
- package/dist/src/tool-provider2.js +1 -1
- package/dist/src/tool-provider3.js +1 -1
- package/dist/src/toolchain-probe.js +1 -1
- package/dist/src/touch-reference-frame.js +1 -0
- package/dist/src/touch-runtime.js +1 -1
- package/dist/src/transport.js +1 -1
- package/dist/src/tree.js +1 -1
- package/dist/src/tv-remote.js +1 -1
- package/dist/src/type-text-runtime.js +1 -1
- package/dist/src/update-check.js +1 -1
- package/dist/src/vars.js +2 -0
- 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/viewport.js +1 -0
- package/dist/src/web.js +1 -1
- package/dist/src/web2.js +1 -1
- package/dist/src/webdriver-ios-snapshot.js +1 -1
- package/dist/src/webdriver-source.js +1 -1
- package/dist/src/window-state.js +1 -0
- package/package.json +4 -2
- package/server.json +2 -2
- package/android/ime-helper/dist/agent-device-android-ime-helper-0.21.0.apk.sha256 +0 -1
- package/android/snapshot-helper/dist/agent-device-android-snapshot-helper-0.21.0.apk +0 -0
- package/android/snapshot-helper/dist/agent-device-android-snapshot-helper-0.21.0.apk.sha256 +0 -1
- package/dist/apple/runner/AgentDeviceRunner/RecordingScripts/recording-trim.swift +0 -93
- package/dist/src/platform-runtime-apple-resources.js +0 -1
- package/dist/src/runner-selector-query.js +0 -1
- package/dist/src/snapshot-quality-verdict.js +0 -1
package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Interaction.swift
CHANGED
|
@@ -11,7 +11,10 @@ private struct RunnerUnsupportedOperationError: LocalizedError {
|
|
|
11
11
|
var errorDescription: String? { message }
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
enum RunnerInterfaceOrientation {
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
15
18
|
static let portrait = 1
|
|
16
19
|
static let portraitUpsideDown = 2
|
|
17
20
|
static let landscapeRight = 3
|
|
@@ -191,11 +194,11 @@ extension RunnerTests {
|
|
|
191
194
|
}
|
|
192
195
|
}
|
|
193
196
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
199
202
|
private func hasTappableFrame(app: XCUIApplication, element: XCUIElement) -> Bool {
|
|
200
203
|
let frame = element.frame
|
|
201
204
|
if frame.isEmpty {
|
|
@@ -204,10 +207,10 @@ extension RunnerTests {
|
|
|
204
207
|
return TapPointPolicy.isAllowed(elementFrame: frame, windowFrame: app.frame)
|
|
205
208
|
}
|
|
206
209
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
|
|
211
214
|
func onScreenWindowFrame(app: XCUIApplication) -> CGRect {
|
|
212
215
|
let window = app.windows.element(boundBy: 0)
|
|
213
216
|
if window.exists {
|
|
@@ -220,11 +223,11 @@ extension RunnerTests {
|
|
|
220
223
|
}
|
|
221
224
|
|
|
222
225
|
func queryElement(app: XCUIApplication, selectorKey: String, selectorValue: String) -> Response {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
|
|
228
231
|
let match = findElement(
|
|
229
232
|
app: app,
|
|
230
233
|
selectorKey: selectorKey,
|
|
@@ -270,8 +273,8 @@ extension RunnerTests {
|
|
|
270
273
|
)
|
|
271
274
|
}
|
|
272
275
|
|
|
273
|
-
|
|
274
|
-
|
|
276
|
+
|
|
277
|
+
|
|
275
278
|
func smallestElementFirst(_ left: XCUIElement, _ right: XCUIElement) -> Bool {
|
|
276
279
|
let leftArea = max(1, left.frame.width * left.frame.height)
|
|
277
280
|
let rightArea = max(1, right.frame.width * right.frame.height)
|
|
@@ -315,37 +318,6 @@ extension RunnerTests {
|
|
|
315
318
|
return nil
|
|
316
319
|
}
|
|
317
320
|
|
|
318
|
-
func textInputAt(app: XCUIApplication, x: Double, y: Double) -> XCUIElement? {
|
|
319
|
-
return textInputCandidatesAt(app: app, point: CGPoint(x: x, y: y)).first
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
private func textInputCandidatesAt(app: XCUIApplication, point: CGPoint) -> [XCUIElement] {
|
|
323
|
-
safely("TEXT_INPUT_AT_POINT", []) {
|
|
324
|
-
// Query the text-input element types directly instead of enumerating the entire tree
|
|
325
|
-
// (app.descendants(.any).allElementsBoundByIndex snapshots every element and is ~10x
|
|
326
|
-
// slower — it dominated fill latency because resolveTextEntryElement re-runs this on
|
|
327
|
-
// each verify/repair poll once the focused field reference goes stale).
|
|
328
|
-
// Prefer the smallest matching field so nested editable controls win over large containers.
|
|
329
|
-
[
|
|
330
|
-
app.textFields,
|
|
331
|
-
app.secureTextFields,
|
|
332
|
-
app.searchFields,
|
|
333
|
-
app.textViews,
|
|
334
|
-
]
|
|
335
|
-
.flatMap { $0.allElementsBoundByIndex }
|
|
336
|
-
.filter { element in
|
|
337
|
-
guard element.exists else { return false }
|
|
338
|
-
let frame = element.frame
|
|
339
|
-
return isCoordinateTextInputCandidate(
|
|
340
|
-
enabled: element.isEnabled,
|
|
341
|
-
frame: frame,
|
|
342
|
-
point: point
|
|
343
|
-
)
|
|
344
|
-
}
|
|
345
|
-
.sorted(by: smallestElementFirst)
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
|
|
349
321
|
private func readableText(for element: XCUIElement) -> String? {
|
|
350
322
|
let label = element.label.trimmingCharacters(in: .whitespacesAndNewlines)
|
|
351
323
|
let identifier = element.identifier.trimmingCharacters(in: .whitespacesAndNewlines)
|
|
@@ -417,8 +389,8 @@ extension RunnerTests {
|
|
|
417
389
|
let coordinate = interactionCoordinate(app: app, x: x, y: y)
|
|
418
390
|
let interval = desktopScrollEventIntervalSeconds(durationMs: durationMs, eventCount: events.count)
|
|
419
391
|
for (index, deltas) in events.enumerated() {
|
|
420
|
-
|
|
421
|
-
|
|
392
|
+
|
|
393
|
+
|
|
422
394
|
coordinate.scroll(
|
|
423
395
|
byDeltaX: CGFloat(deltas.horizontal),
|
|
424
396
|
deltaY: CGFloat(deltas.vertical)
|
|
@@ -513,7 +485,7 @@ extension RunnerTests {
|
|
|
513
485
|
y2: Double,
|
|
514
486
|
holdDuration: TimeInterval
|
|
515
487
|
) -> RunnerInteractionOutcome {
|
|
516
|
-
|
|
488
|
+
|
|
517
489
|
let dx = x2 - x
|
|
518
490
|
let dy = y2 - y
|
|
519
491
|
let button: TvRemoteButton = abs(dx) > abs(dy)
|
|
@@ -525,9 +497,9 @@ extension RunnerTests {
|
|
|
525
497
|
return performCoordinateDrag(app: app, x: x, y: y, x2: x2, y2: y2, holdDuration: holdDuration)
|
|
526
498
|
}
|
|
527
499
|
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
|
|
531
503
|
func nativeSynthesizedPoint(
|
|
532
504
|
orientedX x: Double,
|
|
533
505
|
orientedY y: Double,
|
|
@@ -545,13 +517,13 @@ extension RunnerTests {
|
|
|
545
517
|
return CGPoint(x: localY, y: width - localX)
|
|
546
518
|
case RunnerInterfaceOrientation.portraitUpsideDown:
|
|
547
519
|
return CGPoint(x: width - localX, y: height - localY)
|
|
548
|
-
default:
|
|
520
|
+
default:
|
|
549
521
|
return CGPoint(x: localX, y: localY)
|
|
550
522
|
}
|
|
551
523
|
}
|
|
552
524
|
|
|
553
|
-
|
|
554
|
-
|
|
525
|
+
|
|
526
|
+
|
|
555
527
|
func nativeSynthesizedVector(
|
|
556
528
|
orientedDx dx: Double,
|
|
557
529
|
orientedDy dy: Double,
|
|
@@ -564,7 +536,7 @@ extension RunnerTests {
|
|
|
564
536
|
return CGVector(dx: dy, dy: -dx)
|
|
565
537
|
case RunnerInterfaceOrientation.portraitUpsideDown:
|
|
566
538
|
return CGVector(dx: -dx, dy: -dy)
|
|
567
|
-
default:
|
|
539
|
+
default:
|
|
568
540
|
return CGVector(dx: dx, dy: dy)
|
|
569
541
|
}
|
|
570
542
|
}
|
|
@@ -910,8 +882,8 @@ extension RunnerTests {
|
|
|
910
882
|
screenshotSize: CGSize,
|
|
911
883
|
interfaceOrientation: Int
|
|
912
884
|
) -> CGRect? {
|
|
913
|
-
|
|
914
|
-
|
|
885
|
+
|
|
886
|
+
|
|
915
887
|
guard screenshotSize.width.isFinite, screenshotSize.height.isFinite,
|
|
916
888
|
screenshotSize.width > 0,
|
|
917
889
|
screenshotSize.height > 0
|
|
@@ -937,18 +909,6 @@ extension RunnerTests {
|
|
|
937
909
|
return CGRect(x: 0, y: 0, width: width, height: height)
|
|
938
910
|
}
|
|
939
911
|
|
|
940
|
-
func synthesizedFrameAvoidingKeyboardWhenAllowed(
|
|
941
|
-
app: XCUIApplication,
|
|
942
|
-
context: SynthesizedCoordinateContext
|
|
943
|
-
) -> CGRect {
|
|
944
|
-
#if os(iOS)
|
|
945
|
-
guard context.allowsKeyboardProbe else { return context.referenceFrame }
|
|
946
|
-
return frameAvoidingKeyboard(app: app, frame: context.referenceFrame)
|
|
947
|
-
#else
|
|
948
|
-
return context.referenceFrame
|
|
949
|
-
#endif
|
|
950
|
-
}
|
|
951
|
-
|
|
952
912
|
func keyboardAvoidingSynthesizedDragPoints(
|
|
953
913
|
app: XCUIApplication,
|
|
954
914
|
x: Double,
|
|
@@ -1085,8 +1045,8 @@ extension RunnerTests {
|
|
|
1085
1045
|
) -> RunnerInteractionOutcome {
|
|
1086
1046
|
#if os(iOS)
|
|
1087
1047
|
let orientation = Int(RunnerSynthesizedGesture.interfaceOrientation(forApplication: app))
|
|
1088
|
-
|
|
1089
|
-
|
|
1048
|
+
|
|
1049
|
+
|
|
1090
1050
|
let frame = CGRect(
|
|
1091
1051
|
x: plan.viewport.x,
|
|
1092
1052
|
y: plan.viewport.y,
|
|
@@ -1217,4 +1177,220 @@ extension RunnerTests {
|
|
|
1217
1177
|
}
|
|
1218
1178
|
#endif
|
|
1219
1179
|
|
|
1180
|
+
|
|
1181
|
+
|
|
1182
|
+
|
|
1183
|
+
|
|
1184
|
+
|
|
1185
|
+
|
|
1186
|
+
|
|
1187
|
+
|
|
1188
|
+
|
|
1189
|
+
|
|
1190
|
+
|
|
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
|
+
|
|
1220
1396
|
}
|
package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Keyboard.swift
CHANGED
|
@@ -2,30 +2,30 @@ import XCTest
|
|
|
2
2
|
|
|
3
3
|
private enum KeyboardDismissObservationTiming {
|
|
4
4
|
static let timeout: TimeInterval = 2
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
19
|
static let settleTimeout: TimeInterval = 2.0
|
|
20
20
|
static let settleSampleInterval: TimeInterval = 0.15
|
|
21
21
|
static let settleRequiredConsecutiveMatches: Int = 3
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
29
|
enum RunnerKeyboardDismissMechanism: String {
|
|
30
30
|
case dismissKey
|
|
31
31
|
}
|
|
@@ -61,25 +61,25 @@ extension RunnerTests {
|
|
|
61
61
|
return (wasVisible: true, dismissed: !visible, visible: visible, mechanism: visible ? nil : .dismissKey)
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
70
|
return (wasVisible: true, dismissed: false, visible: isKeyboardVisible(app: app), mechanism: nil)
|
|
71
71
|
#endif
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
83
|
private func waitForScreenshotStability(
|
|
84
84
|
timeout: TimeInterval,
|
|
85
85
|
sampleInterval: TimeInterval,
|
|
@@ -252,15 +252,15 @@ extension RunnerTests {
|
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
254
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
|
|
264
264
|
func runnerScreenshotStabilitySettled(
|
|
265
265
|
_ samples: [Data?],
|
|
266
266
|
requiredConsecutiveMatches: Int
|
|
@@ -273,3 +273,62 @@ func runnerScreenshotStabilitySettled(
|
|
|
273
273
|
return window.allSatisfy { $0 == firstData }
|
|
274
274
|
}
|
|
275
275
|
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
|
package/dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Lifecycle.swift
CHANGED
|
@@ -22,7 +22,7 @@ func runnerCGImage(from image: RunnerImage) -> CGImage? {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
extension RunnerTests {
|
|
25
|
-
|
|
25
|
+
|
|
26
26
|
|
|
27
27
|
func captureRunnerFrame() -> RunnerImage? {
|
|
28
28
|
var image: RunnerImage?
|
|
@@ -70,7 +70,7 @@ extension RunnerTests {
|
|
|
70
70
|
return (NSTemporaryDirectory() as NSString).appendingPathComponent(safeFileName)
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
|
|
74
74
|
|
|
75
75
|
func ensureRunnerHostAppActive(reason: String) {
|
|
76
76
|
NSLog(
|
|
@@ -103,9 +103,9 @@ extension RunnerTests {
|
|
|
103
103
|
|
|
104
104
|
func resetTargetAfterExternalRelaunch() -> Response {
|
|
105
105
|
invalidateCachedTarget(reason: "external_app_relaunch")
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
109
|
clearSnapshotXCTestChannelPenalty(reason: "external_app_relaunch")
|
|
110
110
|
clearPrivateAXAcceptedDepth(reason: "external_app_relaunch")
|
|
111
111
|
beginFirstInteractionStabilization()
|
|
@@ -191,7 +191,7 @@ extension RunnerTests {
|
|
|
191
191
|
initialState.rawValue,
|
|
192
192
|
reason
|
|
193
193
|
)
|
|
194
|
-
|
|
194
|
+
|
|
195
195
|
if initialState == .runningForeground {
|
|
196
196
|
NSLog(
|
|
197
197
|
"AGENT_DEVICE_RUNNER_ACTIVATE_SKIPPED bundle=%@ reason=already_foreground",
|
|
@@ -229,7 +229,7 @@ extension RunnerTests {
|
|
|
229
229
|
performWithQuiescenceSkippedIfSupported(target, operation: operation)
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
-
|
|
232
|
+
|
|
233
233
|
private func performWithQuiescenceSkippedIfSupported(
|
|
234
234
|
_ target: XCUIApplication,
|
|
235
235
|
operation: () -> Void
|
|
@@ -285,7 +285,7 @@ extension RunnerTests {
|
|
|
285
285
|
return false
|
|
286
286
|
}
|
|
287
287
|
|
|
288
|
-
|
|
288
|
+
|
|
289
289
|
|
|
290
290
|
func isReadOnlyCommand(_ command: Command) -> Bool {
|
|
291
291
|
switch command.command.traits.readOnly {
|
|
@@ -294,7 +294,7 @@ extension RunnerTests {
|
|
|
294
294
|
case .never:
|
|
295
295
|
return false
|
|
296
296
|
case .conditional:
|
|
297
|
-
|
|
297
|
+
|
|
298
298
|
return (command.action ?? "get").lowercased() == "get"
|
|
299
299
|
}
|
|
300
300
|
}
|
|
@@ -313,7 +313,7 @@ extension RunnerTests {
|
|
|
313
313
|
return command.traits.isLifecycle
|
|
314
314
|
}
|
|
315
315
|
|
|
316
|
-
|
|
316
|
+
|
|
317
317
|
|
|
318
318
|
func applyInteractionStabilizationIfNeeded() {
|
|
319
319
|
if needsPostSnapshotInteractionDelay {
|
|
@@ -326,8 +326,8 @@ extension RunnerTests {
|
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
328
|
|
|
329
|
-
|
|
330
|
-
|
|
329
|
+
|
|
330
|
+
|
|
331
331
|
func beginFirstInteractionStabilization() {
|
|
332
332
|
firstInteractionReadyUptime =
|
|
333
333
|
ProcessInfo.processInfo.systemUptime + firstInteractionAfterActivateDelay
|
|
@@ -335,7 +335,7 @@ extension RunnerTests {
|
|
|
335
335
|
|
|
336
336
|
func sleepFor(_ delay: TimeInterval) {
|
|
337
337
|
guard delay > 0 else { return }
|
|
338
|
-
|
|
338
|
+
|
|
339
339
|
if Thread.isMainThread {
|
|
340
340
|
let deadline = Date().addingTimeInterval(delay)
|
|
341
341
|
while Date() < deadline {
|