ui_drag
ui_dragDrag one element onto another using real pointer events to reorder HTML5 lists, kanban cards, or pointer-based sortables during Playwright UI tests.
Instructions
Drag the single element matching from onto the single element matching to with real pointer events: reorders HTML5 drag-and-drop lists, kanban cards and pointer-based sortables. Use the selector values from ui_get_page_state. Selectors containing "nth=" are positional: call ui_get_page_state again after the page changes before reusing them.
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": {
"from": "<from>",
"to": "<to>"
},
"name": "ui_drag"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | CSS selector, or the `selector` value of an element from ui_get_page_state, passed unchanged of the element to drop onto | |
| from | Yes | CSS selector, or the `selector` value of an element from ui_get_page_state, passed unchanged of the element to pick up | |
| session_id | No | Which open session to act on, as returned by ui_start_session. Optional with one open session; required when several are open. |