wait_for_element
Wait for an element to exist or be visible, then return its tag and state. Use before interacting with content that loads later, such as spinners or lazy lists.
Instructions
Wait for an element to exist in the page, or with visible: true to also be displayed, then return its tag and state (displayed, enabled). Use it before acting on content that loads later: spinners finishing, lazy lists, dialogs, single-page-app transitions. click, type, and get_text already wait for their own target, so use this to wait for something else first. For URL or title changes, use wait_for_page.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| visible | No | Also require the element to be displayed, not just present in the DOM (default false). | |
| selector | Yes | How to find the element, e.g. { by: 'css', value: '#login-button' } or { by: 'id', value: 'user-name' }. Prefer id, name, or a short CSS selector. | |
| timeoutMs | No | How long to wait, in milliseconds (default 10000, max 60000). |