Actions12
Browser → Evaluate Script
AI-generatedSummary
Evaluate a JavaScript function expression within a browser page context, optionally opening a target URL beforehand, to return the function's result as node output.
Inputs
- Connection Mode (required) — Select whether to launch a new browser instance or connect to an existing one via Chrome DevTools Protocol (CDP).
- Browser Type (required) — Choose browser type to launch (Chromium, Firefox, or WebKit). Shown only if launching a new browser.
- Headless (required) — Specify whether to run the browser without a visible UI (headless mode). Shown only if launching a new browser.
- CDP Endpoint (required) — URL of the Chrome DevTools Protocol endpoint to connect to. Required if connecting via CDP.
- Timeout (MS) (required) — Maximum time in milliseconds to wait for browser actions and operations.
- Session ID — Identifier to reuse the same browser session and page in subsequent nodes.
- Use Existing Tab — When connecting over CDP, choose to reuse an existing browser tab instead of opening a new one.
- Tab Index — Zero-based index of the tab to reuse when 'Use Existing Tab' is enabled.
- Block Resource Types — List of resource types (like images, scripts, etc.) to block and abort on page load to reduce bandwidth; applies only when creating a new page.
- Block URL Patterns — Comma-separated glob patterns of URL requests to block and abort; applies only when creating a new page.
- Additional Data — Optional JSON data included and passed through in the output.
- Target URL — Web page URL to open in the browser before evaluating the script; ignored for 'navigate' or 'runScript' operations.
- Script (required) — JavaScript function expression to evaluate in the page context; the function's return value becomes the result in node output.
- After Execution (required) — Defines whether to close the browser, close just the page/tab, or keep them open after operation completes.
Output shape
a single JSON object representing the evaluation result of the script, plus metadata
Returns an output JSON containing properties like operation name, connection mode, session info, timestamp, and the "result" property containing the evaluated script's output. Includes additional data if provided. The browser or page is closed or retained based on the After Execution setting.