Drag and drop for HTML5 drag-and-drop targets
browser_drag_html5Simulates HTML5 drag-and-drop by dispatching dragstart, dragenter, dragover, drop, and dragend with a real DataTransfer, enabling drops on pages that listen for standard drag events.
Instructions
Perform an HTML5 drag-and-drop by dispatching the DOM events (dragstart/dragenter/dragover/drop/dragend) with a real DataTransfer. WHY THIS EXISTS: MEASURED — the pointer-based browser_drag triggers dragstart and dragover but never drop or dragend, because BiDi only synthesizes mouse/wheel/touch (there is no Input.dispatchDragEvent as in CDP) and Firefox cancels a drag on pointer-up. This tool therefore SIMULATES the drop in page script: it works on pages that listen for the standard drag events, but it is NOT a real drag — pages that check event.isTrusted, or that require genuine OS drag semantics, will still refuse. This exists because of upstream bug 1515879: WebDriver-driven HTML5 DnD never gets a drop event.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | Payload to carry in the DataTransfer (default: the text content of the source element) | |
| mimeType | No | MIME type for the payload (default text/plain) | |
| toSelector | Yes | Element to drop onto | |
| fromSelector | Yes | Element to drag from |