Overview
This node uses Puppeteer, a headless browser automation library, to interact with web pages and capture screenshots. The "Get Screenshot" operation navigates to a specified URL and takes a screenshot of the page. It supports capturing the full scrollable page or just the visible viewport, and allows choosing the image format (PNG, JPEG, WebP) and quality settings.
Common scenarios where this node is beneficial include:
- Automatically generating website previews or thumbnails.
- Monitoring visual changes on web pages over time.
- Capturing screenshots for documentation or reporting purposes.
- Testing and validating UI layouts in automated workflows.
For example, you can use this node to take a PNG screenshot of a product page on an e-commerce site and save it as binary data for further processing or storage.
Properties
| Name | Meaning |
|---|---|
| URL | The web address of the page to capture. |
| Property Name | The name of the binary property where the screenshot image will be stored in the output. |
| Type | The image format for the screenshot: PNG, JPEG, or WebP. |
| Quality | Image quality from 0 to 100, applicable only for JPEG and WebP formats (ignored for PNG). |
| Full Page | Whether to capture the entire scrollable page (true) or just the visible viewport (false). |
| Query Parameters | Optional query parameters to append to the URL before loading the page. |
| Batch Size | Maximum number of pages to open simultaneously during execution. Higher values increase resource usage. |
| Browser WebSocket Endpoint | WebSocket URL to connect to an existing browser instance instead of launching a new one. |
| Browser WebSocket Headers | HTTP headers to send when connecting to the browser WebSocket endpoint. |
| Emulate Device | Optionally emulate a specific device's viewport and user agent. |
| Executable Path | Path to a custom browser executable to use instead of the bundled one. Ignored if connecting via WebSocket. |
| Extra Headers | Additional HTTP headers to send with the page requests. |
| File Name | Filename to assign to the binary data output. Only applies to screenshot and PDF operations. |
| Launch Arguments | Extra command line arguments to pass to the browser process. Ignored if connecting via WebSocket. |
| Timeout | Maximum navigation time in milliseconds before aborting. Set to 0 to disable timeout. |
| Protocol Timeout | Maximum time to wait for protocol responses in milliseconds. Set to 0 to disable timeout. |
| Wait Until | When to consider navigation successful: load, domcontentloaded, networkidle0, or networkidle2. |
| Page Caching | Enable or disable page-level caching (default enabled). |
| Headless mode | Run the browser in headless mode (no GUI). Defaults to true. |
| Use Chrome Headless Shell | Run the browser in headless shell mode, which requires the chrome-headless-shell binary in PATH. Requires headless mode enabled. |
| Stealth mode | Apply techniques to make Puppeteer harder to detect as a headless browser. |
| Human typing mode | Enables a human-like typing function .typeHuman() on page elements to simulate realistic typing behavior. |
| Human Typing Options | Configuration for delays and typo chances when using human typing mode. |
| Proxy Server | Custom proxy server configuration for browser traffic (e.g., localhost:8080, socks5://localhost:1080). |
| Add Container Arguments | Automatically add recommended arguments for running Puppeteer inside container environments (e.g., --no-sandbox). Defaults to true. |
Output
The node outputs an array of items corresponding to each input item processed. For the "Get Screenshot" operation, each output item contains:
- A
binaryproperty with the screenshot image data stored under the user-defined property name (e.g.,"data"). This binary data includes the image buffer and metadata such as mime type (image/png,image/jpeg, orimage/webp). - A
jsonproperty containing metadata about the request, including HTTP response headers, status code, and the final URL after applying query parameters.
No textual content of the page is returned by this operation. The binary data can be used downstream for saving files, uploading, or further processing.
Dependencies
- Requires Puppeteer and puppeteer-extra libraries with plugins for stealth and human typing modes.
- Supports connecting to an existing Chromium-based browser via WebSocket or launching a new browser instance.
- If using stealth mode, the stealth plugin is applied to reduce detection.
- If human typing mode is enabled, the human typing plugin is applied.
- Optional device emulation uses Puppeteer's known devices list.
- To run in headless shell mode, the
chrome-headless-shellbinary must be installed and available in the system PATH. - Proxy server support requires proper proxy configuration string.
- The node may require an API key credential or token if connecting to a remote browser WebSocket endpoint that requires authentication.
Troubleshooting
- Failed to launch/connect to browser: Check that the executable path is correct or that the WebSocket endpoint is reachable and credentials are valid.
- Invalid URL error: Ensure the URL parameter is a valid URL string. Query parameters are appended safely but the base URL must be well-formed.
- Timeout errors: Increase the navigation timeout or protocol timeout if pages load slowly.
- Memory or CPU overload: Reduce batch size to limit simultaneous pages opened.
- Stealth mode not working: Some sites may still detect headless browsers; try disabling stealth or adjusting launch arguments.
- Headless shell mode fails: Verify
chrome-headless-shellis installed and in PATH, and that headless mode is enabled. - Binary data missing or corrupt: Confirm the file name and image type properties are set correctly and supported.