From 283a0faa6549a68cfff1121c59174c024b05340e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Tue, 10 Mar 2026 12:37:06 +0100 Subject: [PATCH 1/2] docs: add missing command reference entries --- website/docs/docs/commands.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/website/docs/docs/commands.md b/website/docs/docs/commands.md index f42729c5..b736e601 100644 --- a/website/docs/docs/commands.md +++ b/website/docs/docs/commands.md @@ -177,17 +177,18 @@ agent-device find role button click ## Assertions ```bash -agent-device is visible @e3 -agent-device is exists 'role="button" label="Continue"' +agent-device is visible 'role="button" label="Continue"' +agent-device is exists 'id="primary-cta"' agent-device is hidden 'text="Loading..."' agent-device is editable 'id="email"' agent-device is selected 'label="Wi-Fi"' agent-device is text 'id="greeting"' "Welcome back" ``` -- `is` evaluates UI predicates against a snapshot ref or selector and exits non-zero on failure. +- `is` evaluates UI predicates against a selector expression and exits non-zero on failure. - Supported predicates are `visible`, `hidden`, `exists`, `editable`, `selected`, and `text`. -- `is text ` compares the resolved element text against the expected value. +- `is text ` compares the resolved element text against the expected value. +- `is` does not accept snapshot refs like `@e3`; use a selector expression instead. - `is` accepts the same selector-oriented snapshot flags as `click`, `fill`, `get`, and `wait`. ## Replay From 8548278903f14bd73b493d58e37d37012d35ca1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Tue, 10 Mar 2026 12:58:27 +0100 Subject: [PATCH 2/2] docs: clarify wait ref behavior --- website/docs/docs/commands.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/website/docs/docs/commands.md b/website/docs/docs/commands.md index b736e601..39188ce3 100644 --- a/website/docs/docs/commands.md +++ b/website/docs/docs/commands.md @@ -131,7 +131,10 @@ agent-device alert dismiss ``` - `wait` accepts a millisecond duration, `text `, a snapshot ref (`@eN`), or a selector. -- `wait [timeoutMs]` and `wait @ref [timeoutMs]` poll until the target appears or the timeout expires. +- `wait [timeoutMs]` polls until the selector resolves or the timeout expires. +- `wait @ref [timeoutMs]` requires an existing session snapshot from a prior `snapshot` command. +- `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. +- Because `wait @ref` is text-based after resolution, duplicate labels can match a different element than the original ref target. - `wait` shares the selector/snapshot resolution flow used by `click`, `fill`, `get`, and `is`. - `alert` inspects or handles system alerts on iOS simulator targets. - `alert` without an action is equivalent to `alert get`.