wait_for_selector
Wait for a CSS selector element to reach a specific state (attached, detached, visible, or hidden) before proceeding, ensuring page or popup loading completes.
Instructions
等待指定元素出现在页面中(可用于等待页面加载、弹窗等)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"selector": "<selector>"
},
"name": "wait_for_selector"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| state | No | 等待状态:attached(出现)、detached(消失)、visible(可见)、hidden(隐藏) | visible |
| timeout | No | 超时时间(毫秒),默认 10000 | |
| selector | Yes | CSS 选择器 |