Drag and Drop using Webdriver Action ClassSubmitted by harrydev on Sat, 12/27/2014 - 11:11
We have taken example program to perform drag and drop. In the below example, as the DragAndDrop divs are in a Frame, First we need to switch to the frame before performing drag and drop. And then we also need to check for the availability of SourceElement and DestinationElements.
Syntax for drag and drop
Actions action = new Actions(driver);
We can also make it as below:
(new Actions(driver)).dragAndDrop(element, target).perform();