browser_eval
Execute JavaScript in the active page and get its result. Use for direct state inspection or modification.
Instructions
Evaluate a JavaScript expression in the active page (via CDP) and return its value. Runs in the page's main world and can mutate page state. Prefer browser_snapshot for reading structure and browser_click/type for interactions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expression | Yes | A JavaScript expression evaluated in the page; its result is returned (JSON-serializable values). |