//drag.
WebElement From=driver.findElement(By.xpath("//div[@id='settings']//div[2]"));
Thread.sleep(3000);
// drop.
WebElement To=driver.findElement(By.xpath("//div[@class='panel-body']"));
Thread.sleep(3000);
Actions act=new Actions(driver);
act.dragAndDrop(From,To).build().perform();
}
}
-
Please help me.i'm not getting– umesh reddyApr 29, 2020 at 13:55
-
1Becarefull with posting passwords, also cross-posting is not allowed: meta.stackexchange.com/questions/64068/…– Niels van ReijmersdalApr 29, 2020 at 18:16
1 Answer
Try this:
import org.openqa.selenium.interactions.Actions;
Actions act=new Actions(driver.get());
act.dragAndDrop(a,b).release().build().perform();