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 e479065
Browse filesBrowse the repository at this point in the historyBrowse files
fix(ios): close false-failure windows in the commit wait
Adversarial review found two deterministic false failures in the wait added by
the previous commit, plus a message that asserted a field state never read.
The deadline was checked before observing, so a commit landing during the final
poll sleep was condemned as never observed — under exactly the loaded-host
timing the wait exists for. The check now runs after an observation, so the last
thing before condemning is a read.
`treatingPlaceholderAsEmpty` maps a value equal to the field's placeholder to
"", a prefix of every expected value. `type "0.00"` into a field placeheld
"0.00" committed instantly, read as pending for the full 3s, and failed. The
observation now settles on an exact raw match; the normalized read still drives
the prefix walk.
The outcome-to-failure mapping moves to textEntryFailure(forCommitOutcome:) so
the branch the command refuses on is pinned by a test rather than living only in
a ternary. `.unobservable` staying a success is what keeps `type "...\n"`
working, and it now has an assertion.
Message and hint no longer claim the field holds a partial value: under both
fixed windows it may hold all of it. The docs sentence no longer implies every
text-entry route verifies its result — the replacement and keyboard-visible
routes have no resolvable element to observe and are unchanged.
Refs #1874, #1844
Copy file name to clipboardExpand all lines: apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TextEntry.swift
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ extension RunnerTests {
16
16
case.synthesisUnavailable:
17
17
return"Reliable text synthesis is unavailable while the software keyboard is hidden."
18
18
case.commitNotObserved:
19
-
return"The app committed only part of the typed text before the commit deadline."
19
+
return"The runner could not confirm the typed text committed before its deadline."
20
20
}
21
21
}
22
22
@@ -27,7 +27,7 @@ extension RunnerTests {
27
27
case.synthesisUnavailable:
28
28
return"Show the software keyboard, then retry type or fill."
29
29
case.commitNotObserved:
30
-
return"The field holds a partial value. Read it back before retrying, and prefer fill, which replaces the whole value, over type, which appends to whatever committed."
30
+
return"The field may hold none, part, or all of the text. Read it back before retrying, and prefer fill, which replaces the whole value, over type, which appends to whatever committed."
`type` accepts text only. Do not pass `@ref` to `type`; use `fill @ref "text"` to target a field directly, or `press @ref` then `type "text"` to append in the focused field.
428
428
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.
429
429
On iOS, if `type` reports `TEXT_INPUT_SYNTHESIS_UNAVAILABLE` while the software keyboard is hidden, show the software keyboard, then retry `type` or `fill`. The runner reports this error instead of risking partial input through an unreliable text-entry path.
430
-
On iOS, if `type` reports `TEXT_INPUT_COMMIT_NOT_OBSERVED`, the app committed only part of the typed text before the runner's commit deadline. The field holds a partial value: read it back, then prefer `fill`, which replaces the whole value, over `type`, which appends to whatever committed. The runner reports this instead of succeeding over a field whose contents it could not confirm.
430
+
On iOS, if `type` reports `TEXT_INPUT_COMMIT_NOT_OBSERVED`, the runner could not confirm the typed text reached the field before its deadline. The field may hold none, part, or all of the text: read it back, then prefer `fill`, which replaces the whole value, over `type`, which appends to whatever committed. This covers the bare-type route, which observes the field after synthesizing; it is not a guarantee that every text-entry route verifies its result.
431
431
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.
432
432
Delayed typing intentionally prefers paced character entry over clipboard-style fallbacks so the target field receives each incremental update.
433
433
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