find_by_text
Locate elements by visible text and get every match with a reference and ancestor path, so you can verify the exact element to interact with before acting.
Instructions
Find elements by visible text — returns EVERY match (total + a ref and ancestor path per candidate), so you can tell whether the one you want is really the one you'd click. Skip browser_snapshot when you know the text.
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": {
"text": "<text>"
},
"name": "find_by_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Visible text to search for | |
| exact | No | ||
| limit | No | Max candidates to describe. | |
| within | No | Limit the search: "@dialog", "ref:e5", or a CSS selector. |