Captures a screenshot of the element. Returns a Download object containing the URL or Base64 data of the screenshot image. Example: screenshot(options: { type: PNG, omitBackground: true })

Definition

screenshot(
  options: ScreenshotOptions
): Download

Arguments

options: ScreenshotOptions

Options to configure the screenshot, such as image type, quality, or clipping. See ScreenshotOptions.

Returns

Download

Represents a downloadable resource, typically a file generated by an action (e.g., PDF or screenshot). It may contain a URL to the resource or the resource data directly encoded as a Base64 string.

Usage

This field is available on the Page object. Use it to query page information and content.