You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7baa118
Browse filesBrowse the repository at this point in the historyBrowse files
fix(ios-runner): charge the warmup split the type plan really makes
The review found `projectedSeconds` charging one synthesize call for an
append-mode `type` while the route posts a warmup character and then the
rest, so the estimate undercounted one call and the wait between them.
The over-budget branch that asks is the one with no element, so its
warmup wait is one poll: `waitForWarmupValue` has no expected value to
wait for. That branch now charges 2 calls and the poll, which is one
character less than a replacement of the same length.
Also: the budget hint and the docs named one limit and said "the number"
for a delayed retry, which reads as the larger one; both now name the
limit for the delay in play and say the delay falls between characters.
The pace's header comment claimed the acknowledge window is derived from
it, which it is not. The synthesized-replacement helper builds its
command with JSONSerialization, and the over-budget lane test polls the
field under its own deadline instead of reading `value` once on a route
that verifies nothing.
return"Fill at most \(SynthesizedDeliveryBudget.maxTextLength(delaySeconds:0)) characters at a time without --delay-ms and append the rest with separate type commands, keeping each command inside that budget. --delay-ms lowers the budget, because every character then pays its own synthesize call and the delay: \(recoveryBudget) characters at --delay-ms \(recoveryDelay). A longer timeout does not help: this route is chosen when the accessibility channel is already degraded, and the pace is what makes the text long."
39
+
return"Fill at most \(SynthesizedDeliveryBudget.maxTextLength(delaySeconds:0)) characters at a time without --delay-ms and append the rest with separate type commands, keeping each command inside that budget. --delay-ms lowers the budget, because each character then gets its own synthesize call and each gap between characters pays the delay: \(recoveryBudget) characters at --delay-ms \(recoveryDelay). A longer timeout does not help: this route is chosen when the accessibility channel is already degraded, and the pace is what makes the text long."
Copy file name to clipboardExpand all lines: apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/UnitTests/RunnerTests+SynthesizedTextEntryTests.swift
If `type` reports `TEXT_INPUT_NOT_FOCUSED`, focus a visible text input and retry; when accessibility does not expose the input, use a coordinate focus command before typing.
489
489
On iOS, if `type "\n"` reports `TEXT_INPUT_SYNTHESIS_UNAVAILABLE` after tapping a field while the software keyboard is hidden, show the software keyboard, then retry. The runner reports this error instead of risking input through an unreliable text-entry path.
490
490
On iOS, if `fill` reports `TEXT_INPUT_COMMIT_NOT_OBSERVED`, the runner could not confirm the typed text reached the field — either it did not land before the runner's deadline, or the expected final text is identical to the field's placeholder. In the latter case, accessibility cannot distinguish committed text from an empty field rendering that placeholder, even if the field held content before dispatch. The field may hold none, part, or all of the text: run `snapshot -i` and inspect it. If it already matches, continue; otherwise retry with the full text quoted and `fill --delay-ms 80`, which replaces the whole value. Do not use `type`, which appends to whatever committed. This covers the coordinate-driven `fill` route taken when the accessibility channel is under load, which observes the field after synthesizing; it is not a guarantee that every text-entry route verifies its result.
491
-
On iOS, if `fill` reports `TEXT_INPUT_SYNTHESIS_BUDGET_EXCEEDED`, the text is longer than that coordinate-driven route can type inside one runner command at its bounded pace, and nothing was typed. Fill at most the number of characters the hint names and append the rest with separate `type` commands. `--delay-ms` lowers that budget, because every character then pays its own synthesize call and the delay; a longer timeout does not help.
491
+
On iOS, if `fill` reports `TEXT_INPUT_SYNTHESIS_BUDGET_EXCEEDED`, the text is longer than that coordinate-driven route can type inside one runner command at its bounded pace, and nothing was typed. Fill at most the character limit the hint names for your `--delay-ms`, and append the rest with separate `type` commands: the hint gives one limit without `--delay-ms` and a lower one for the delay it recommends. `--delay-ms` lowers the budget because each character then gets its own synthesize call and each gap between characters pays that delay; a longer timeout does not help.
492
492
Use plain `fill` or `type` first for ordinary login and form fields. Use `--delay-ms` on `type` or `fill` only when a debounced search field or search-as-you-type input actually misses characters, or when the app must receive incremental updates.
493
493
Delayed typing intentionally prefers paced character entry over clipboard-style fallbacks so the target field receives each incremental update.
494
494
On Android, `fill` also verifies text and treats IME-owned capture as a terminal failure instead of retrying against the wrong field.
0 commit comments