Skip to content

AppiumTransport.captureScreenshot method

AppiumTransport › captureScreenshot

Captures a PNG screenshot of the device's screen.

The image is always the device's native framebuffer — there is no mobile equivalent of the desktop viewport override, so CaptureScreenshotParams.widthInPixels / CaptureScreenshotParams.heightInPixels are ignored. Size a mobile capture by choosing an AVD whose screen geometry already matches what the image has to be.

Signature:

captureScreenshot(_params: CaptureScreenshotParams): Promise<Uint8Array>

Parameters:

ParameterTypeDescription
_paramsCaptureScreenshotParamsCapture parameters. Ignored on mobile: cwd does not select a window (vault targeting is via localStorage), and the size cannot be overridden.

Returns: Promise<Uint8Array>The raw PNG bytes.