input_by_xapth
Set text in a web element using XPath in the current tab, optionally clearing existing content. Returns an error if the element is not found.
Instructions
通过xpath给当前标签页中某个元素输入内容,最好先判断元素是否存在
Args: xpath (str): 元素的XPath表达式 input_value (str): 要输入的内容 clear_first (bool): 是否先清除已有内容,默认为True
Returns: Any: 输入操作的结果,如果元素不存在则返回错误信息
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": {
"xpath": "<xpath>",
"input_value": "<input_value>"
},
"name": "input_by_xapth"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| xpath | Yes | ||
| clear_first | No | ||
| input_value | Yes |