query
Run a CSS selector on the parsed DOM to find matching elements. Returns structured data with element references for further interaction.
Instructions
Run a CSS selector against the current page's parsed DOM. Returns matching elements as [{ref, tag, attrs, text, text_chars, text_truncated}]. Element refs (e:NN) are stable handles for use with click/type/submit. Selector engine supports tag, id, class, attribute matchers (=, ^=, $=, *=, ~=), all four combinators (descendant, >, +, ~), pseudo-classes (:first/last/nth-child including An+B formulas, :first/last/nth-of-type, :only-child/of-type), :not(), and :has().
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| selector | Yes | CSS selector |