Taiko
Documentation

Home / API Reference

dragAndDrop

Fetches the source element with given selector and moves it to given destination selector or moves for given distance. If there's no element matching selector, the method throws an error. Drag and drop of HTML5 draggable does not work as expected, refer https://github.com/getgauge/taiko/issues/279

Examples

await dragAndDrop($("work"),into($('work done')))
await dragAndDrop($("work"),{up:10,down:10,left:10,right:10})

Parameters


source

Element to be Dragged


destination

Element for dropping the dragged element


distance

Distance to be moved from position of source element


Returns

Promise