find_elements
Locate web elements by CSS selector or visible text, returning their tag names, text, and optional outer HTML for easier DOM inspection and browser automation.
Instructions
Find element(s) matching a CSS selector or visible text, and return their tag name, text, and outer HTML (optional). Args: selector: CSS selector, or text to search for (CDP mode can match elements by visible text as well as by selector, e.g. 'a:contains("Sign in")'). timeout: Seconds to wait for at least one match to appear. include_html: Whether to include the html with each matching element. Returns a dict with 'count' (total matches found) and 'matches' (a list of {tag_name, text, html} dicts, or {tag_name, text} dicts if not including html).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| timeout | No | ||
| selector | Yes | ||
| include_html | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |