package com.mavlushechka.a1qa.driverUtils; import org.openqa.selenium.Point; import org.openqa.selenium.WebElement; import org.openqa.selenium.interactions.Actions; public class ActionUtils { private ActionUtils() { } public static void dragAndDrop(WebElement element, Point currentPoint, Point expectedPoint) { new Actions(WebDriverSingleton.getInstance()) .moveToElement(element, currentPoint.x, currentPoint.y) .click() .dragAndDropBy(element, expectedPoint.x, expectedPoint.y) .build() .perform(); } }