browser.find_elements
Locate page elements by CSS selector or text/regex query, returning text, href, value, bounding box, and visibility for scraping or clicking.
Instructions
Find elements either by CSS selector or by a text/regex query across the page's text content. selector mode returns matching elements' text, href, value, bounding box, and visibility -- useful before clicking or scraping multiple items. query mode (set query, optionally regex and context) returns the matched text plus surrounding context for each hit -- a cheap way to locate a specific string on the page without a full observe.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Most matches to return. | |
| query | No | Text or regex to search for across the page's text content, as an alternative to selector. Matching is case-insensitive in both modes. Returns matched elements plus surrounding text. | |
| regex | No | Treat query as a regular expression (JavaScript syntax, 'gi' flags) instead of a plain-text substring match. | |
| context | No | Characters of surrounding text to include around each match when query is used. | |
| selector | No | CSS or Playwright selector. Give this or query. | |
| session_id | No | Target session id, from browser.create_session or browser.list_sessions. Optional when exactly one session is live; observe and act tools create one when none is. |