evaluate
Execute a JavaScript expression in the current page context and return the serializable result as JSON for extracting data or testing logic.
Instructions
Execute a JavaScript expression in the page context and return the result as JSON. The expression may return any serialisable value.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| script | Yes | JavaScript expression or statement block to evaluate. Wrap multi-statement code in an IIFE if a return value is needed. |