Skip to content

captureObsidianScreenshot

Captures a PNG screenshot of the running Obsidian instance, resolving the transport and vault from the current test context.

Import:

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

Signature:

function captureObsidianScreenshot(options: CaptureObsidianScreenshotOptions | undefined): Promise<Uint8Array<ArrayBufferLike>>

Parameters:

ParameterTypeDescription
optionsCaptureObsidianScreenshotOptions | undefinedOptional size, transport and vault overrides.

Returns: Promise<Uint8Array<ArrayBufferLike>> — A Promise that resolves to the raw PNG bytes.


Links to this page: