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