Skip to content

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

await dragAndDrop($("work"),into($('work done')))
await dragAndDrop($("work"),{up:10,down:10,left:10,right:10}, { force: true})
NameTypeDescription
sourceselector | stringElement to be Dragged
destinationunknown
optionsunknownDefault: {}.
destinationOrDistanceselector | string | ObjectElement for dropping the dragged element
or an object specifying the drag&drop distance to be moved from position of source element
TypeDescription
Promise<void>