drag_and_drop
Drag a source element onto a target in Chrome to test drag-and-drop or sortable UI. Emits HTML5 or pointer events and returns after dispatch; verify drop acceptance separately.
Instructions
Drag an element onto another. html5 = DragEvent+DataTransfer; pointer = pointer/mouse events (sortable libraries). It scrolls the source into view and returns once the events are sent, without knowing whether the app accepted the drop (check with assert or query_dom); a missing element is an error.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"source_selector": "<source_selector>",
"target_selector": "<target_selector>"
},
"name": "drag_and_drop"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Which event family to emit, since libraries listen to different ones | html5 |
| tab_id | No | Target tab; omitted = last tab navigated in this session, else the active one | |
| frame_id | No | Target iframe id from get_frames; omitted = main frame | |
| source_selector | Yes | Element to drag; ">>>" pierces shadow DOM | |
| target_selector | Yes | Drop target; ">>>" pierces shadow DOM |