Overview
hover
Move cursor to element center or coordinates
drag
Drag from one element or point to another
mouse-move
Move cursor to absolute screen coordinates
mouse-click
Click at absolute screen coordinates
mouse-down
Press mouse button at coordinates (without releasing)
mouse-up
Release mouse button at coordinates
When to Use Mouse Commands
Prefer interaction commands (likeclick @e3) over mouse commands. Use mouse commands only when:
- Element has no accessibility representation
- Pixel-precise positioning is required
- Custom drag-and-drop interactions
- Game or canvas automation
Common Patterns
Hover Over Element
Hover at Coordinates
Drag Between Elements
@e3 center to element @e8 center.
Drag Between Coordinates
(100, 200) to (400, 200).
Click at Coordinates
--button (left, right, middle) and --count (1, 2, 3).
Double-Click at Coordinates
Right-Click at Coordinates
Manual Drag Sequence
For complex drag gestures:Examples
Use Cases
Reveal Tooltips
Reveal Tooltips
Hover over elements to trigger tooltips:
Drag and Drop
Drag and Drop
Drag files, reorder lists, move windows:
Canvas Interaction
Canvas Interaction
Interact with drawing apps, games, or custom canvas elements:
Pixel-Precise Positioning
Pixel-Precise Positioning
When accessibility bounds are unreliable:
Coordinate System
- Origin
(0, 0)is top-left of the primary screen - X increases to the right
- Y increases downward
- Multi-monitor setups: coordinates extend into negative space or beyond primary screen bounds
{"x": 100, "y": 200, "width": 80, "height": 40}.
Mouse Buttons
Supported values for--button:
left(default)rightmiddle
Error Handling
Common error codes:INVALID_ARGS: Coordinates out of bounds or malformedACTION_FAILED: OS rejected the mouse eventELEMENT_NOT_FOUND: Ref doesn’t exist (when using element-based hover/drag)