glass_drag
Drag the pointer between two window-relative coordinates while holding a button and optional modifiers, with a configurable duration to simulate mouse drags for GUI testing.
Instructions
Drag one pointer from (x1,y1) to (x2,y2), holding the button and modifiers throughout. Motion spans duration_ms. Either endpoint outside the window is refused. Use glass_gesture for multi-touch. For 2+ known steps, use glass_do.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x1 | Yes | Press x in window-relative pixels. | |
| x2 | Yes | Release x in window-relative pixels. | |
| y1 | Yes | Press y in window-relative pixels. | |
| y2 | Yes | Release y in window-relative pixels. | |
| button | No | Button held for the drag: "left" (default), "right", or "middle". | |
| modifiers | No | Held modifiers, e.g. ["ctrl", "shift"]. | |
| duration_ms | No | Motion duration in ms (default 200). Faster motion gives the app fewer sampled frames. |