![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjslnkg4ILigMnrxdc8InBO0sJ6ZHO3nnwn2AfM-VDRAAgXhkzWW21p1hwnoYbIWG29ma56o1L9jJYJhzVL5iukUqiaLF0bj_bPB6VRV_DcEogykHdMsVAz3yeXCaPtcWFl27jZ4PADGvU/s1600/20200818_203329.jpg)
Element which needs to drag.
WebElement source=driver.findElement(By.xpath("//*[@id='element1']"));
Element on which need to drop.
WebElement destination=driver.findElement(By.xpath("//*[@id='element2']"));
Using Action class we can drag and drop.
Actions act=new Actions(driver);
act.dragAndDrop(source, destination).build().perform();
No comments:
Post a Comment