browser_evaluate
Evaluate JavaScript expressions on web pages or specific elements using a provided function. Optionally target an element and save results to a file. Ideal for dynamic content extraction and automated testing.
Instructions
Evaluate JavaScript expression on page or element
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| element | No | Human-readable element description used to obtain permission to interact with the element | |
| target | No | Exact target element reference from the page snapshot, or a unique element selector | |
| function | Yes | () => { /* code */ } or (element) => { /* code */ } when element is provided | |
| filename | No | Filename to save the result to. If not provided, result is returned as text. |