Interaction
wait
Wait for an element to appear in the DOM. Uses MutationObserver for efficient detection.
Usage
$ cdpilot wait <selector> [<timeout>]Arguments
| Name | Required | Description |
|---|---|---|
selector | required | CSS selector to wait for |
timeout | optional | Timeout in seconds (default: 5) |
Examples
Wait up to 5 seconds for a modal to appear
$ npx cdpilot wait ".modal-content"Wait up to 10 seconds for results
$ npx cdpilot wait "#results" 10