click_and_wait
Click an element and wait for a specified outcome to confirm the action succeeded, avoiding silent failures like unsubmitted forms.
Instructions
⭐ Click + wait for the side-effect to land. Distinguishes a successful action from a silent failure (e.g. form invalid where click() returns success but submit never happened).
Args:
ref / selector / text: element to click (passed through to existing
click tools — text uses click_text fuzzy match)
expect: what to wait for after the click. One of:
"navigation" — URL changes
"url" — URL matches expect_url_pattern (regex)
"text" — page contains expect_text
"selector" — expect_selector becomes visible
"request" — outgoing request matches expect_request_pattern
"network_idle" — no in-flight requests for 500ms
"auto" — try navigation→network_idle→nothing
expect_*: target for the matching expect mode
timeout: per-mode max wait
Returns JSON {clicked, observed: {what, evidence}, elapsed_ms}.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | ||
| selector | No | ||
| text | No | ||
| expect | No | auto | |
| expect_url_pattern | No | ||
| expect_text | No | ||
| expect_selector | No | ||
| expect_request_pattern | No | ||
| timeout | No |
Output Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |