Screenshot
Takes a screenshot of the specified web page.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
info
If the ContinueOnError property is true, errors will not be caught when the project is executed even if the Catch node is used.
Input
- Page Id - The ID of the web page to take the screenshot of. This ID is generated by the Open Browser node.
- Save File Path - The file path to save the screenshot.
Output
- Path - The path where the screenshot was saved.
Options
There are no options available for this node.
How It Works
- The node receives the Page ID and Save File Path
- It validates that the Page ID is not empty
- It waits for any configured delay before execution
- It retrieves the active page session using the provided Page ID
- The node captures a screenshot of the current visible viewport
- The screenshot is saved to the specified file path as a PNG image
- The file path where the screenshot was saved is stored in the output variable
- The node applies any configured delay after execution
Requirements
- An active browser session created by the Open Browser node
- A valid Page ID from the Open Browser node
- A valid file path with write permissions for saving the screenshot
- The directory path must exist (the node doesn't create directories)
- Sufficient disk space to save the screenshot file
Error Handling
| Error Code | Description |
|---|---|
| Core.Browser.Screenshot.ErrOnCreate | Configuration parsing error during node creation |
| Core.Browser.Screenshot.ErrOnMessage | Error parsing incoming message data |
| Core.Browser.Screenshot.ErrPageId | Page ID is empty or not provided |
| Core.Browser.ClickElement.ErrSession | Invalid or expired Page ID, session not found |
| Core.Browser.Screenshot.ErrFailed | Failed to capture or save the screenshot |
| Core.Browser.Screenshot.ErrOutputMarshal | Error serializing output path |
Usage Examples
Example 1: Documentation and Reporting
When creating automated documentation with screenshots:
1. Use Open Browser and navigate to the target page
2. Use Screenshot with:
- Save File Path: C:/reports/page_screenshot.png
3. The screenshot is saved to the specified location
4. Use the output path to embed the image in reports
5. Continue with other documentation tasks
Example 2: Error Detection and Debugging
When capturing page state during error conditions:
1. Wrap automation in Try-Catch block
2. Perform browser operations
3. In the Catch block:
- Use Screenshot to capture current page state
- Save with timestamp: C:/logs/error_{timestamp}.png
- Log the error and screenshot path
4. Use screenshots for debugging failed automations
Example 3: Visual Verification
When verifying page appearance or layout:
1. Navigate to the page to verify
2. Wait for all elements to load
3. Use Screenshot to capture the page
4. Compare with baseline screenshot (using image comparison tools)
5. Report any visual differences
6. Continue with validation workflow
Usage Notes
- Screenshots capture the visible viewport, not the entire scrollable page
- The screenshot is saved in PNG format
- File paths should include the .png extension
- If the file already exists, it will be overwritten
- The directory must exist; the node doesn't create parent directories
- Screenshots include all visible browser chrome (depending on browser settings)
- Hidden elements (display:none) are not captured
- Dynamic content should be fully loaded before screenshot
- Screenshot quality depends on browser rendering
Tips
- Use unique filenames (timestamps, GUIDs) to avoid overwriting previous screenshots
- Create the target directory before running the automation
- Add a small Delay Before to ensure page is fully rendered
- For full-page screenshots, consider scrolling and capturing multiple sections
- Use absolute paths to avoid confusion about file locations
- Include screenshots in error handling for better debugging
- For comparing screenshots, use consistent browser window sizes
- Consider file size when taking many screenshots (can grow quickly)
- Use Delay Before if page has animations that need to complete
Related Nodes
- Open Browser - Creates the browser session and Page ID
- Wait Element - Ensures page is ready before screenshot
- Save Image - Saves specific images from page
- Run Script - Can be used for custom screenshot logic