I have tried the below code for drag and droppping an element. But it is only selecting the element. Hold and drop is not happening.
WebElement source = driver.findElement(By.xpath("//tbody[@class ='lt-body']//tr[@data-test-id='table-row-id-20']//td[contains(@id,'ember')]//div[contains(@id,'ember')]//*[name()='svg']//*[name()='ellipse']"));
WebElement destination = driver.findElement(By.xpath("//tbody[@class ='lt-body']//tr[@data-test-id='table-row-id-3']//td[contains(@id,'ember')]//div[contains(@id,'ember')]//*[name()='svg']//*[name()='ellipse']"));
Actions builder = new Actions(driver);
int x2 =destination.getLocation().getX();
int y2 = destination.getLocation().getY();
builder.clickAndHold(source);
builder.moveByOffset(x2,y2);
builder.moveToElement(destination);
builder.release();
builder.perform();
And, I tried this one as well.
builder.clickAndHold(source).moveByOffset(x2,y2).moveToElement(destination).release().build().perform();
Tried with Robot as well. Everytime I can only see both source and destination element getting selected. But not dragged and dropped.
Also tried dragAndDrop of ActionsChain. That too didn't work.