Playwright icon

Playwright

Automate browser actions using Playwright

Take Screenshot

AI-generated

Summary

Take a screenshot of a webpage specified by a URL using a chosen browser and store the image in a binary property.

Inputs

  • URL (required) — The URL to navigate to before taking the screenshot.
  • Property Name (required) — Name of the binary property to store the screenshot data.
  • Browser — Select the browser to use for the screenshot (Chromium, Firefox, or Webkit). Defaults to Chromium.
  • Browser Launch Options — Options to configure browser launch, such as headless mode and operation slow motion.
  • Screenshot Options — Options for the screenshot, including whether to capture the full scrollable page and a file path to save the image.

Output shape

a single item containing a binary property with the screenshot image, and a JSON object with the success status and the final page URL

The binary property name is determined by the user input 'Property Name'. The JSON response includes keys 'success' set to true and 'url' indicating the navigated page URL. If a file path is specified in Screenshot Options, the screenshot is also saved to disk at that location.

Examples

Example 1: Take a screenshot of a full webpage using Firefox with headless browser

Provide the target URL, set 'Browser' to Firefox, enable 'Full Page' in Screenshot Options, and specify a 'Property Name' for the binary data.

Links

Discussion