zen_wait_for_element
Waits for a CSS selector to become visible on the page, enabling reliable interaction with dynamic content. Returns immediately when the element is found, avoiding fixed sleep durations.
Instructions
Wait for a CSS selector to appear and become visible on the page. Returns immediately when the element is found, rather than sleeping a fixed duration. Use this instead of sleep when waiting for dynamic/JS-rendered content.
Args: selector: CSS selector to wait for (e.g. ".tracking-events", "#results", "[data-loaded]") timeout: Maximum time to wait in milliseconds (default: 10000 = 10s) poll_interval: How often to check in milliseconds (default: 200ms) tab_id: Optional tab to target. Defaults to active tab.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| selector | Yes | ||
| timeout | No | ||
| poll_interval | No | ||
| tab_id | No |