page_query_xpath
Queries a WeChat mini-program page using an XPath expression to find the first matching element, returning its element_id handle for subsequent automation.
Instructions
在页面中按 XPath 表达式查询首个匹配元素(返回 element_id 句柄)
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": {
"page_id": "<page_id>",
"xpath": "<xpath>"
},
"name": "page_query_xpath"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| xpath | Yes | XPath 表达式(选择元素节点),如 //view[contains(@class, "header")] | |
| page_id | Yes |