【发布时间】:2013-08-01 05:07:44
【问题描述】:
我正在为我的项目使用 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())
但这也行不通。请帮我解决这个问题
【问题讨论】:
标签: javascript selenium selenium-webdriver mouseover