wait_for_element
Waits for a web element to reach a specified state (visible, hidden, attached, detached) using a CSS selector within a defined timeout, ensuring proper web automation and interaction timing.
Instructions
Wait for an element to appear or disappear
Input Schema
Name | Required | Description | Default |
---|---|---|---|
selector | Yes | CSS selector for the element | |
state | No | State to wait for | visible |
timeout | No | Timeout in milliseconds |
Input Schema (JSON Schema)
{
"properties": {
"selector": {
"description": "CSS selector for the element",
"type": "string"
},
"state": {
"default": "visible",
"description": "State to wait for",
"enum": [
"attached",
"detached",
"visible",
"hidden"
],
"type": "string"
},
"timeout": {
"default": 30000,
"description": "Timeout in milliseconds",
"type": "number"
}
},
"required": [
"selector"
],
"type": "object"
}