browser_evaluate
Run JavaScript expressions on a web page or specified element to extract data, test behavior, or produce computed output; save results to a file when needed.
Instructions
Evaluate JavaScript expression on page or element
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Exact target element reference from the page snapshot | |
| 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 | |
| sessionId | No | Target session ID. Omit to use the active session. |