Skip to content

CaptureScreenshotParams

Parameters for capturing a screenshot of a running Obsidian instance.

Import:

import type { CaptureScreenshotParams } from 'obsidian-integration-testing';

Signature:

export interface CaptureScreenshotParams

Properties

PropertyTypeDescription
cwdstringThe working directory (vault path) identifying which Obsidian window to capture.

Mirrors the cwd of an evaluation: a desktop instance can hold several vault windows, and the capture has to be routed to the right one.
heightInPixels?numberThe 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.
widthInPixels?numberThe exact width in pixels the captured image should have.

See heightInPixels — the two are set together or not at all.

Links to this page: