Skip to content

ClickMouseParams

Parameters for Lib.clickMouse.

Import:

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

Signature:

export interface ClickMouseParams

Properties

PropertyTypeDescription
button?MouseButtonThe mouse button to press.
modifiers?readonly Modifier[]The modifier keys to hold, using Obsidian's Modifier names. 'Mod' resolves per-platform (Cmd on macOS, Ctrl elsewhere).
window?WindowThe Obsidian window to click in: the main window or a popout. Pass the window that owns the target, e.g. leaf.view.containerEl.win for a popout leaf. Each Obsidian window is its own Electron web contents, so a click sent to one never reaches another, and the coordinates are in the named window's viewport.

**On mobile** there are no popouts, so any window but the main one throws.
xnumberThe x coordinate (web-contents DIP) to click at.
ynumberThe y coordinate (web-contents DIP) to click at.

Links to this page: