@@ -131,7 +131,10 @@ agent-device alert dismiss
131131```
132132
133133- ` wait ` accepts a millisecond duration, ` text <value> ` , a snapshot ref (` @eN ` ), or a selector.
134- - ` wait <selector> [timeoutMs] ` and ` wait @ref [timeoutMs] ` poll until the target appears or the timeout expires.
134+ - ` wait <selector> [timeoutMs] ` polls until the selector resolves or the timeout expires.
135+ - ` wait @ref [timeoutMs] ` requires an existing session snapshot from a prior ` snapshot ` command.
136+ - ` wait @ref ` resolves the ref to its label/text from that stored snapshot, then polls for that text; it does not track the original node identity.
137+ - Because ` wait @ref ` is text-based after resolution, duplicate labels can match a different element than the original ref target.
135138- ` wait ` shares the selector/snapshot resolution flow used by ` click ` , ` fill ` , ` get ` , and ` is ` .
136139- ` alert ` inspects or handles system alerts on iOS simulator targets.
137140- ` alert ` without an action is equivalent to ` alert get ` .
@@ -177,17 +180,18 @@ agent-device find role button click
177180## Assertions
178181
179182``` bash
180- agent-device is visible @e3
181- agent-device is exists ' role="button" label="Continue "'
183+ agent-device is visible ' role="button" label="Continue" '
184+ agent-device is exists ' id="primary-cta "'
182185agent-device is hidden ' text="Loading..."'
183186agent-device is editable ' id="email"'
184187agent-device is selected ' label="Wi-Fi"'
185188agent-device is text ' id="greeting"' " Welcome back"
186189```
187190
188- - ` is ` evaluates UI predicates against a snapshot ref or selector and exits non-zero on failure.
191+ - ` is ` evaluates UI predicates against a selector expression and exits non-zero on failure.
189192- Supported predicates are ` visible ` , ` hidden ` , ` exists ` , ` editable ` , ` selected ` , and ` text ` .
190- - ` is text <target> <value> ` compares the resolved element text against the expected value.
193+ - ` is text <selector> <value> ` compares the resolved element text against the expected value.
194+ - ` is ` does not accept snapshot refs like ` @e3 ` ; use a selector expression instead.
191195- ` is ` accepts the same selector-oriented snapshot flags as ` click ` , ` fill ` , ` get ` , and ` wait ` .
192196
193197## Replay
0 commit comments