Actions17
Wait for Selector
AI-generatedSummary
Wait for an element matching the specified selector to reach a certain state (attached, detached, visible, or hidden) within a browser session.
Inputs
- Session ID — Session ID from previous action to continue browser interaction; leave empty to start a new session automatically.
- Selector (required) — CSS selector of the element to wait for.
- State — Desired state of the element to wait for: attached, detached, visible, or hidden. Defaults to visible.
- Strict — Whether to require exactly one matching element (strict mode). Defaults to false.
- Timeout — Maximum time to wait for the element in milliseconds. Defaults to 30000 (30 seconds).
Output shape
a single JSON object containing a message, a boolean 'found' indicating if the element reached the state, and the selector string used
The operation returns a JSON with keys: 'message' (status information), 'found' (true if the element reached the desired state within timeout), and 'selector' (the CSS selector). The session ID may be returned for use in subsequent actions.