gesture-drag
Simulates a desktop mouse drag in Chromium using normalized coordinates. Use for slider thumbs, drag-and-drop, or text selection.
Instructions
Press the left mouse button at a start point, move to an end point, and release — a desktop mouse drag in a Chromium app. All positions are normalized 0.0–1.0 (fractions of the window, not pixels), same coordinate space as gesture-tap and describe. Interpolates mouse-move events at ~60fps over durationMs for a natural drag. Use for slider thumbs, drag-and-drop, text selection, or draggable UI elements. Dragging never scrolls content on desktop — use gesture-scroll for lists/pages. Chromium only — on iOS/Android use gesture-swipe. Returns { dragged: true, timestampMs }. Fails if the Chromium CDP session is not reachable for the given device.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| toX | Yes | Release x: normalized 0.0–1.0 (not pixels; same space as tap). | |
| toY | Yes | Release y: normalized 0.0–1.0 (not pixels; same space as tap). | |
| udid | Yes | Target Chromium device id from `list-devices` (chromium-cdp-<port>). | |
| fromX | Yes | Press x: normalized 0.0–1.0 (fraction of window width, not pixels). | |
| fromY | Yes | Press y: normalized 0.0–1.0 (fraction of window height, not pixels). | |
| durationMs | No | Total drag duration in milliseconds (default 300), interpolated at ~60fps. |