ScreenshotOptions
Input options for configuring screenshots taken with the ‘screenshot’ query.
Definition
Fields
type
: ScreenshotType
Specifies the image format for the screenshot. Defaults to PNG. See ScreenshotType
enum.
quality
: Int
The quality of the image, for JPEG format only, between 0 and 100. Higher is better quality. Defaults to system-specific value (e.g., 80-90).
fullPage
: Boolean
If true, captures a screenshot of the full scrollable page. If false (default), captures only the visible viewport. Note: This typically means the full element, even if it’s scrollable.
animations
: ScreenshotAnimations
Controls animation behavior during screenshotting. See ScreenshotAnimations
enum. Defaults to ‘DISABLED’.
caret
: ScreenshotCaret
Controls the visibility of the text input caret (cursor) in the screenshot. See ScreenshotCaret
enum. Defaults to ‘HIDE’.
clip
: BoxOptions
An optional box to clip the screenshot to a specific region of the element or page. See BoxOptions
.
omitBackground
: Boolean
If true, omits the default white background from screenshots with transparency (e.g., transparent PNGs). Defaults to false.
scale
: ScreenshotScale
Specifies the scaling of the screenshot. See ScreenshotScale
enum. Defaults to ‘CSS’.
style
: String
Custom CSS styles to apply to the page before taking the screenshot. This can be used to alter appearance for the screenshot, e.g., hiding elements.
Example: "div.cookie-banner { display: none; }"
timeout
: Int
Maximum time in milliseconds to wait for the page or element to be ready before taking the screenshot. Defaults to a global timeout.