I am automating drag and drop using Selenium and Java. Following is the code used for performing drag and drop using chrome driver in headless mode.
Point classname = targetElement.getLocation(); int xcordi = classname.getX(); int ycordi = classname.getY(); Actions action = new Actions(driver); action.clickAndHold(sourceElement).moveByOffset(xcordi, ycordi).release(targetElement).build().perform();
Nothing happens when this is executed in headless chrome driver. However, in non-headless chrome driver, this works fine and drag and drop is performed.
Note - Tried using both dragAndDropBy(source, target) and dragAndDropBy(source, xOffset, yOffset). Both of these methods are not working in non-headless chrome as well