Drag from one place to another
browser_dragSimulate a real mouse drag by pressing a source selector or viewport coordinates, moving in steps, and releasing on a target; use it for sliders and canvas drag interactions.
Instructions
Perform a real mouse drag: press on the source, move in steps, release on the target. Source and target may each be a CSS selector or viewport coordinates. Step count matters for pages that track dragging (sliders, canvas) — raise steps if a plain move is not picked up. COLOR: for HTML5 drag-and-drop this will NOT produce a drop event. That is upstream bug 1515879 ("HTML5 drag and drop does not work", Remote Protocol / Marionette, filed 2018-12-21, still NEW) — EventUtils.js ends the drag session without synthesizing drop. Use browser_drag_html5 for HTML5 targets.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| toX | No | Target viewport x | |
| toY | No | Target viewport y | |
| fromX | No | Source viewport x | |
| fromY | No | Source viewport y | |
| steps | No | Intermediate move steps (default 12) | |
| context | No | Tab context id (default: the active tab) | |
| toSelector | No | Target element selector | |
| fromSelector | No | Source element selector |