选择下拉项
element_selectSelect an option in a dropdown using visible text, value attribute, or index. Specify the element ID and matching criteria for precise browser automation.
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": {
"element_id": "<element_id>",
"by": "<by>",
"value": "<value>"
},
"name": "element_select"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| by | Yes | 选择方式:text=按可见文本, value=按 value 属性, index=按序号(从 1 开始) | |
| value | Yes | 匹配的文本 / value / 序号 | |
| element_id | Yes | find_element 返回的 <select> 元素 id |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| message | Yes |