I am using code below to drag and drop action using webdriver 

```
driver.get("https://www.w3schools.com/html/tryit.asp?filename=tryhtml5_draganddrop");
    driver.switchTo().frame("iframeResult");
    Actions act = new Actions(driver);
    act.dragAndDrop(driver.findElement(By.xpath("html/body/img")),driver.findElement(By.xpath("html/body/div[1]"))).perform();

```

it is dragging the element but not dropping it in the target