聚焦页面元素
focusMoves focus to a specific element using a CSS selector, preparing input fields for typing. Triggers focus and focusin events to ensure the target is ready for user interaction.
Instructions
通过 CSS 选择器找到元素并聚焦(focus + focusin),适合输入前把焦点放到指定输入框。
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": "focus"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | 操作说明:展示给页面用户的自然语言描述(用户会在页面气泡的操作记录里看到),用用户的语言填写,建议始终提供 | |
| pageId | No | 目标页面 id(单页时可省略) | |
| selector | Yes | CSS 选择器 |