Playwright API icon

Playwright API

Interact with Playwright API

Overview

This node provides automation capabilities by interacting with browser sessions through the Playwright API. Specifically, for the Session - Screenshot operation, it captures a screenshot of the current state of a specified browser session. This is useful in scenarios such as:

  • Monitoring website appearance or changes over time.
  • Capturing visual evidence during automated testing.
  • Generating thumbnails or previews of web pages.
  • Debugging UI issues by capturing the exact rendered page.

For example, after navigating a session to a particular URL, you can use this operation to take a screenshot and save it for later review or processing.

Properties

Name Meaning
Session ID The unique identifier of the browser session from which to capture the screenshot.
Binary Property The name of the binary property in the output where the screenshot image data will be stored. Default is "data".

Output

The node outputs the screenshot image data as binary under the specified binary property name (default "data"). This binary data represents the captured screenshot file (e.g., PNG or JPEG format) of the webpage in the given session.

The JSON output typically contains metadata about the operation result, but the main content is the binary data holding the screenshot image, which can be used downstream in workflows for saving to disk, uploading, or further processing.

Dependencies

  • Requires an active Playwright browser session identified by the provided Session ID.
  • Needs proper authentication configured via an API key credential to access the Playwright API.
  • The node depends on the bundled operations.screenshot method from the internal operations module to perform the screenshot capture.

Troubleshooting

  • Common Issues:

    • Invalid or expired Session ID: Ensure the session exists and is active before taking a screenshot.
    • Insufficient permissions or missing API credentials: Verify that the API key credential is correctly set up.
    • Network or browser errors during screenshot capture.
  • Error Messages:

    • "The operation "screenshot" is not supported!": Indicates an unsupported operation was requested; verify the operation parameter.
    • Errors related to session not found or closed: Confirm the session ID is correct and the session is still running.
    • Binary property write failures: Check that the binary property name is valid and does not conflict with other properties.

To resolve these, confirm session validity, credential configuration, and input parameters.

Links and References

Discussion