Skip to content

decodeBase64Png

Decodes the base64 payload both CDP (Page.captureScreenshot) and Appium (takeScreenshot) return into raw PNG bytes.

Import:

import { decodeBase64Png } from 'obsidian-integration-testing';

Signature:

function decodeBase64Png(base64: string): Uint8Array<ArrayBufferLike>

Parameters:

ParameterTypeDescription
base64stringThe base64-encoded image data.

Returns: Uint8Array<ArrayBufferLike> — The decoded bytes.