我正在使用Selenium Webdriver进行我的项目。我已经成功地自动化了代码以鼠标悬停在图像上,但是,用这段代码却无法移动到超链接上。
我使用的代码是:
我使用的代码是:
Actions build1 = new Actions(driver);
build1.moveToElement(WebElement).build().perform();
我还尝试使用以下代码:
Locatable hoverItem = (Locatable) driver.findElement();
Mouse mouse = ((HasInputDevices) driver).getMouse();
mouse.mouseMove(hoverItem.getCoordinates())
但它也没有起作用。请帮助我解决这个问题。
Actions build1 = new Actions(driver); build1.moveToElement(WebElement).build().perform();
? - Mark Rowlands