expect
Verify page state after an action by checking element, text, URL, and challenge-wall conditions in a single call.
Instructions
ONE-CALL verification gate. Assert the page reached an expected state — composes element-state / page-text / URL checks plus a native challenge-wall check into a single {passed, failures[]} verdict. Use after an action to confirm it landed (or that you got soft-blocked) instead of stitching wait/text/url/screenshot calls. Every check is optional.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lease | No | Optional lease token to present if the target session is leased (0.7.0). Threaded per-call; never read from the server's env. | |
| state | No | Expected element state (default 'visible'): visible|hidden|attached|detached. | |
| target | No | Element to assert — @eN / @text: / @label: / CSS. | |
| session | No | Optional session name to target (omit for the shared 'default'). On a daemon shared with other agents, pass a UNIQUE name for stateful multi-step work (go→click→fill) so you don't collide on 'default'. | |
| screenshot | No | auto = capture only on failure (evidence); always; never. | auto |
| timeout_ms | No | Per-wait budget. | |
| allow_walled | No | If false (default), a detected Cloudflare/DataDome challenge wall is a failure. | |
| url_contains | No | Current URL must contain this substring. | |
| text_contains | No | Page text must contain this substring. |