Skip to main content

Screenshot

Captures screenshots of the entire page or specific elements. Useful for documentation, debugging, and visual verification.

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 the node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If Continue On Error property is true, no error is caught when the project is executed, even if the Catch node is used.

Input

  • Browser ID - The browser session identifier from the Open Browser node.
  • Selector - The XPath or CSS selector for element screenshot (not required if Take full page is enabled).
  • Path - File path to save the screenshot image. Must end with .png, .jpg, or .jpeg extension.

Options

  • Selector Type - Type of selector used:

    • XPath - Use XPath expression (default)
    • CSS - Use CSS selector
  • Take full page - Capture the entire page instead of a specific element. Default is false.

  • Wait Timeout (sec) - Maximum time to wait for element to appear (only for element screenshots). Default is 5 seconds.

Examples

Full Page Screenshot

Browser ID: {{browser_id}}
Path: C:\screenshots\page.png
Take full page: true

Element Screenshot

Browser ID: {{browser_id}}
Selector: //div[@class='product-card']
Path: C:\screenshots\product.png
Take full page: false

Screenshot for Verification

Browser ID: {{browser_id}}
Selector: //div[@id='result']
Path: {{download_dir}}/result_{{timestamp}}.png

Screenshot Multiple Elements

For each product in product_list:
Browser ID: {{browser_id}}
Selector: //div[@data-product-id='{{product.id}}']
Path: C:\screenshots\product_{{product.id}}.png

Supported Image Formats

  • .png - PNG format (recommended for web screenshots)
  • .jpg or .jpeg - JPEG format

Tips

  • Use PNG format for better quality and transparency support
  • Include timestamps in filenames to avoid overwriting: screenshot_{{timestamp}}.png
  • Full page screenshots may take longer for long pages
  • Element screenshots are faster and smaller in file size
  • Ensure the directory exists before saving screenshots
  • Use absolute paths for reliability

Common Errors

  • "Browser ID cannot be empty" - Connect to an Open Browser node
  • "Path cannot be empty" - Provide a file path for the screenshot
  • "Invalid file path" - Path must end with .png, .jpg, or .jpeg
  • "Selector cannot be empty for element screenshot" - Provide a selector or enable 'Take full page'
  • "Element not found within X seconds" - The element doesn't exist or takes longer to load
  • "Timeout cannot be empty" - Provide a timeout value