expect_text
Assert that visible text is (or is not) currently rendered in the device accessibility tree. Default substring match; pass exact=true for full-string match. Pass exists=false to assert NOT visible. Convenience wrapper over device_snapshot + label scan; equivalent to Maestro’s assertVisible: ”…” but callable mid-batch and during interactive walks without leaving the LLM context.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
text | string | Yes | The visible text to look for. | ||
exact | boolean | No | Default false (substring match). Pass true to require exact label equality. | ||
exists | boolean | No | Default true (assert visible). Pass false to assert NOT visible. | ||
timeoutMs | number | No | min: 0, integer | Polling timeout in ms (default 0). |
expect_text(text: <string>)