Playwright icon

Playwright

Automate browser actions using Playwright

Overview

This node automates browser actions using Playwright, specifically enabling users to take screenshots of web pages. It is useful for capturing visual snapshots of websites for monitoring, testing, or documentation purposes. For example, it can be used to capture a screenshot of a product page to verify UI changes or to archive a webpage's appearance at a specific time.

Use Case Examples

  1. Taking a screenshot of a full webpage for visual regression testing.
  2. Capturing a screenshot of a login page to verify UI elements are rendered correctly.

Properties

Name Meaning
URL The URL of the webpage to navigate to before taking the screenshot.
Browser The browser engine to use for automation (Chromium, Firefox, or Webkit).
Browser Launch Options Options to configure the browser launch, such as running in headless mode or slowing down operations.
Screenshot Options Options specific to taking screenshots, such as capturing the full page or saving the screenshot to a file path.

Output

JSON

  • screenshot - The screenshot data or metadata resulting from the operation.

Dependencies

  • Playwright library for browser automation
  • Browser executables for Chromium, Firefox, or Webkit

Troubleshooting

  • Common issues include browser executable path errors, which can be resolved by installing the required browser using the node's internal setup script.
  • Errors launching the browser may occur if the Playwright library or browser binaries are missing or corrupted; reinstalling or updating Playwright and browsers can help.
  • If the node fails but 'Continue On Fail' is enabled, it returns an error message with browser type and OS info instead of stopping the workflow.

Discussion