Actions12
Browser → Extract Text
AI-generatedSummary
Extract text content from a webpage element identified by a CSS selector using an automated browser session.
Inputs
- Connection Mode — Choose whether to launch a new browser instance or connect to an existing one via Chrome DevTools Protocol (CDP).
- Browser Type — Select the browser type (Chromium, Firefox, or WebKit) when launching a new browser. Only shown if Connection Mode is 'Launch Browser'.
- Headless — Run the browser without a visible window when launching.
- CDP Endpoint — The HTTP endpoint for the Chrome DevTools Protocol to connect to an existing browser. Required if Connection Mode is 'Connect Over CDP'.
- Timeout (MS) — Maximum time in milliseconds to wait for browser actions to complete.
- Session ID — Identifier to reuse the same browser session and page across multiple nodes.
- Use Existing Tab — Whether to reuse an already-open tab in the browser when connected over CDP.
- Tab Index — Zero-based index of the tab to reuse when reusing an existing tab.
- Block Resource Types — List of resource types to block from loading to optimize performance when a new page is created.
- Block URL Patterns — Comma-separated URL glob patterns to block requests matching those patterns when a new page is created.
- Additional Data — Optional JSON data to include in the operation output for context or metadata.
- Target URL — URL to navigate to before extracting text, unless the operation is 'navigate' or 'runScript'.
- Selector (required) — CSS selector of the element from which to extract the text.
- After Execution — Defines whether to close the browser, close only the tab, or keep the browser open after the operation completes.
Output shape
a JSON object containing the extracted text along with metadata
Output includes keys: 'operation' ('extractText'), 'connectionMode', 'sessionId', 'tabIndex', 'timestamp', 'selector' (the input CSS selector), 'text' (the extracted text content), 'success' (boolean), and optionally 'additionalData' and 'cdpEndpoint' if provided. The operation either closes or keeps the browser session according to the 'After Execution' setting.
Examples
Example 1: Extract visible text from an element with CSS selector '#main-header' on https://example\.com
Set Connection Mode to 'Launch Browser', Browser Type to 'Chromium', Target URL to 'https://example.com', Selector to '#main-header', and After Execution to 'Close Browser'. The node outputs the visible text content of the '#main-header' element.