Skip to content

capture-obsidian-screenshot

Captures a screenshot of the Obsidian instance the current test context is already driving.

The transport-level captureScreenshot needs a transport in hand, which a test running under the harness’s global setup never has — the instance is owned by that setup and reached through the context provider. This is the context-resolving entry point, the screenshot counterpart of evalInObsidian / pollInObsidian: with no arguments at all it captures whatever instance the active project is driving, desktop or mobile.

InterfaceDescription
CaptureObsidianScreenshotOptionsOptions for captureObsidianScreenshot.
FunctionDescription
captureObsidianScreenshotCaptures a PNG screenshot of the running Obsidian instance, resolving the transport and vault from the current test context.