browser_evaluate
Execute JavaScript expressions on a page or element to retrieve data, alter the DOM, or test functionality. Use this tool to run custom code directly within the live browser context.
Instructions
Evaluate JavaScript expression on page or element
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | No | Exact target element reference from the page snapshot, or a unique element selector | |
| element | No | Human-readable element description used to obtain permission to interact with the element | |
| filename | No | Filename to save the result to. If not provided, result is returned as text. | |
| function | Yes | () => { /* code */ } or (element) => { /* code */ } when element is provided |