pilot_wait
Wait for an element to appear or disappear, for network requests to finish, or for a page to fully load before proceeding with the next action.
Instructions
Wait for a specific condition before proceeding — an element to appear, the network to become idle, or the page to finish loading. Use when the user wants to wait for a dynamic element to load, wait for AJAX/fetch requests to complete, or wait for a modal/spinner to appear or disappear.
Parameters:
ref: Element reference from snapshot (e.g., "@e10") or CSS selector to wait for
state: What to wait for — "visible" (element appears, default), "hidden" (element disappears), "networkidle" (no network requests for 500ms), or "load" (page load event)
timeout: Maximum wait time in milliseconds (default: 15000)
Returns: Confirmation of what was waited for and its state.
Errors:
"Timeout waiting for element": The element did not reach the expected state in time. Increase timeout or check the selector.
"Nothing to wait for": Neither ref nor state was provided. Supply at least one.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Element ref or CSS selector to wait for | |
| state | No | What to wait for | |
| timeout | No | Timeout in milliseconds (default: 15000) |