drag
Perform mouse-based drag operations for CSS-driven interactions such as adjusting sliders, resizing elements, selecting text, and reordering lists. Specify start and end points via selectors or coordinates.
Instructions
Drag via native CDP mouse events. Works for CSS-driven drag: slider thumbs, resize handles, text selection, mouse-based reorder lists (SortableJS in mouse mode). NOT for the HTML5 Drag&Drop API (draggable=true with dragstart/drop listeners, React DnD HTML5Backend, Vuedraggable, ng2-dnd) — that needs Input.dispatchDragEvent. Source: from_ref/from_selector or from_x+from_y; target: to_ref/to_selector or to_x+to_y.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to_x | No | Target viewport X in px (with to_y) | |
| to_y | No | Target viewport Y in px | |
| steps | No | Native mouseMoved events between press and release; minimum 5 | |
| from_x | No | Source viewport X in px (with from_y) | |
| from_y | No | Source viewport Y in px | |
| to_ref | No | Target element ref | |
| from_ref | No | Source element ref | |
| to_selector | No | Target CSS selector | |
| from_selector | No | Source CSS selector |