query_text
Find page elements by their visible text content, even when CSS classes are unstable. Skips headers, footers, and navigation to return clickable anchors.
Instructions
Find elements by visible text content. Returns the smallest/deepest element whose textContent matches the needle, with chrome (header/nav/footer/aside) skipped. Anchor-promotion: a span/strong/etc. inside an resolves to the anchor (so click() targets the actionable element). Right tool when CSS selectors are unstable (React-rendered pages with hashed class names) but the visible label is reliable — e.g. find a 'Sign in' button without knowing its class.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Substring to match (or exact string if exact=true) | |
| exact | No | If true, exact match instead of substring (default false) | |
| limit | No | Max matches to return (default 20) | |
| selector | No | Optional CSS selector to limit search scope (default: whole document body) |