drag(draggedElementSelector, dragPath)

🚧

This is a TDK feature

This is not supported in Testim's visual editor

Dragged the given element alongside the given x/y path.

Beta Danger: This method is only supported in certain scenarios because of the selenium API limitations. It is expected to be fully working in the non-beta release.

  • draggedElementSelector {string | TDKStepLocator} a CSS selector or smart locator for the element being dragged.
  • dragPath: {array[{x:number, y:number}]} an array of x,y pairs to drag the element through - absolute on the screen.
  • returns: Promise which fulfills when the element matching draggedElementSelector has been dragged through the given path
await drag('.item:active', [{x: 30, y: 50}, {x: 30, y: 60}]);