pilot_assert
Verify current page state by asserting URL, text presence, element visibility, or input value. Returns pass/fail signal for automated test flows.
Instructions
Assert a condition about the current page state and fail with a structured error if the assertion is not met. Use when the user wants to verify the outcome of an action — that a URL was reached, text is present or absent, an element is visible/hidden/enabled, or an input has a specific value. Returns a clear pass/fail signal for agent-driven test flows.
Parameters:
url: Assert the current page URL equals or contains this string
text_present: Assert this text is visible somewhere on the page (waits up to 5s)
text_absent: Assert this text is NOT visible on the page
ref: Element ref (@eN) to assert a state or value on
state: Expected element state — "visible", "hidden", "enabled", or "disabled"
value: Expected input value for the element pointed to by ref
Returns: "✓ N assertion(s) passed" if all checks pass.
Errors:
Returns isError=true with details of which assertion failed and what was found instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Assert current URL equals or contains this string | |
| text_present | No | Assert this text is visible on the page | |
| text_absent | No | Assert this text is NOT visible on the page | |
| ref | No | Element ref (@eN) to check state or value | |
| state | No | Expected element state | |
| value | No | Expected input value for the element ref |