鼠标操作
自动化实现鼠标操作比如拖拽,右击等
actions.clickAndHold(onElement).moveToElement(toElement).release().build().perform();
eg:
chromeDriver.get(url);
WebElement sourceElement=chromeDriver.findElement(By.id("Demo_2"));
WebElement targetElement=chromeDriver.findElement(By.id("Demo_3"));
Actions actions = new Actions(chromeDriver);
actions.clickAndHold(sourceElement).moveToElement(targetElement).release().build().perform();