Skip to content

CaptureScreenshotParams.heightInPixels?

CaptureScreenshotParams › heightInPixels?

Type: number

The exact height in pixels the captured image should have.

Desktop only, and only meaningful together with widthInPixels: the viewport is pinned to these metrics for the duration of the capture, so the resulting PNG is exactly this size whatever size the window happens to be. Omit both to capture the window at its natural size.

Ignored by the Appium transport, which can only return the device's native framebuffer — size a mobile capture by choosing an AVD with the wanted screen geometry instead.