I need to drag an element from one location to other using the selenium webdriver for angula6 element
I have tried using
Actions act = new Actions(driver); act.dragAndDrop(from, to).build().perform();
but it does not work.
import org.openqa.selenium.interactions.Actions;
String obj = "/html[1]/body[1]/app-root[1]/app-frame[1]/div[1]/adsvalu-create-sales-target[1]/section[1]/div[1]/div[1]/section[1]/div[1]/div[2]/div[1]/div[2]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]";
String obj1 = "/html[1]/body[1]/app-root[1]/app-frame[1]/div[1]/adsvalu-create-sales-target[1]/section[1]/div[1]/div[1]/section[1]/div[1]/div[2]/div[1]/div[2]/div[1]/div[1]/div[2]/div[1]/div[1]";
WebElement from = driver.findElement(By.xpath(obj));
WebElement to = driver.findElement(By.xpath(obj1));
Actions act = new Actions(driver);
act.dragAndDrop(from, to).build().perform();
There is no error but the drag and drop action is not happening