screenshot
Screenshots the page or a specific selector
Usage Example:
mutation TakeScreenshot {
goto(url: "https://example.com") {
status
}
screenshot {
base64
}
}
Field Definition:
screenshot(
captureBeyondViewport: Boolean
clip: ScreenshotClip
fromSurface: Boolean
fullPage: Boolean
omitBackground: Boolean
optimizeForSpeed: Boolean
quality: Float
selector: String
type: ScreenshotType
timeout: Float
waitForImages: Boolean
): ScreenshotResponse
Arguments
screenshot.captureBeyondViewport ● Boolean scalar
Capture the screenshot beyond the viewport. Default: False if there is no clip. True otherwise
screenshot.clip ● ScreenshotClip input
Specifies the region of the page/element to clip
screenshot.fromSurface ● Boolean scalar
Capture the screenshot from the surface, rather than the view. Default: True
screenshot.fullPage ● Boolean scalar
When True, takes a screenshot of the full page. Default: False
screenshot.omitBackground ● Boolean scalar
Hides default white background and allows capturing screenshots with transparency. Default: False
screenshot.optimizeForSpeed ● Boolean scalar
Optimize image encoding for speed, not for resulting size. Default: False
screenshot.quality ● Float scalar
Quality of the image, between 0-100. Not applicable to png images.
screenshot.selector ● String scalar
The CSS selector of the element on the page you want to screenshot
screenshot.type ● ScreenshotType enum
The final format of the screenshot
screenshot.timeout ● Float scalar
The maximum amount of time, in milliseconds, to wait for the screenshot to be taken. Default timeout is 30 seconds, or 30000.
screenshot.waitForImages ● Boolean scalar
When true, waits for all images on the page to load before taking the screenshot. Default: False
Type
ScreenshotResponse object
The response returned after generating a Screenshot