Overview
This node uses Puppeteer to automate browser actions for capturing screenshots of web pages. It supports taking screenshots in various image formats (PNG, JPEG, WebP), with options for full-page capture, image quality, and custom query parameters. The node is useful for scenarios like website monitoring, visual testing, or generating thumbnails of web pages.
Use Case Examples
- Capture a full-page screenshot of a product page in PNG format for visual monitoring.
- Generate a JPEG screenshot of a news article with custom query parameters to capture dynamic content.
- Take a WebP screenshot of a landing page with specified image quality for optimized storage.
Properties
| Name | Meaning |
|---|---|
| URL | The web page URL to capture the screenshot from. |
| Property Name | The name of the binary property where the screenshot image data will be stored. |
| Type | The image format type for the screenshot (PNG, JPEG, or WebP). |
| Quality | The quality of the image between 0-100, applicable only for JPEG and WebP formats. |
| Full Page | Whether to capture the entire scrollable page or just the viewport. |
| Query Parameters | Additional query parameters to append to the URL when loading the page. |
| Options | Various advanced options including batch size, browser connection, device emulation, headers, launch arguments, timeouts, caching, headless mode, stealth mode, human typing simulation, proxy server, download capture, and container environment arguments. |
Output
Binary
Contains the screenshot image data in the specified binary property name.
JSON
headers- HTTP response headers from the page request.statusCode- HTTP status code of the page request.url- The final URL of the page after applying query parameters.
Dependencies
- Puppeteer library (puppeteer-extra and puppeteer-extra-plugins) for browser automation.
Troubleshooting
- Common issues include browser launch failures due to missing or incompatible browser executable paths or incorrect launch arguments. Verify the executable path and container arguments if running in Docker/Kubernetes.
- Timeout errors can occur if the page takes too long to load. Adjust the 'Timeout' and 'Protocol Timeout' options accordingly.
- Invalid URLs or malformed query parameters will cause navigation errors. Ensure URLs are valid and query parameters are correctly formatted.
- Errors related to unsupported image types or invalid quality settings can be resolved by selecting supported image types (PNG, JPEG, WebP) and valid quality values (0-100).
Links
- Puppeteer Documentation - Official documentation for Puppeteer browser automation library.
- puppeteer-extra GitHub - Repository for puppeteer-extra and its plugins used for stealth and human typing modes.