Wait for element
wait_for_selectorWait for an element matching a CSS selector to appear, polling until found. Use it when the markup is known but the wording is not, returning as soon as the element shows up.
Instructions
Wait until an element matching a CSS selector appears on the page.
The structural counterpart to wait_for: use it when you know the markup but not the wording, or when the wording is localised.
Polls about three times a second and returns as soon as the element shows up. Unlike wait_for it does not return a snapshot, so follow with take_snapshot when you intend to interact.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| timeout | No | Maximum wait in milliseconds before giving up. | |
| visible | No | Also require the element to have a non-zero size. Use this with frameworks that insert an element into the DOM before rendering it — presence alone would otherwise resolve too early. | |
| selector | Yes | CSS selector to wait for, e.g. "#login" or ".results .item". |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |