browser_evaluate
Run custom JavaScript in a webpage to extract data that accessibility snapshots miss, returning JSON-serializable results.
Instructions
Run arbitrary JavaScript in the page and return the result.
Example: document.title or ({hrefs: [...document.querySelectorAll('a')].map(a => a.href)}).
Use for scraping data the accessibility snapshot cannot express.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| js | Yes | JavaScript expression or statement body to run in the page. Return JSON-serializable values. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |