selenium webdriver 模拟鼠标悬浮
/**模拟鼠标悬浮在某元素上 * @param driver * @param locator */ public static void moveToElement(WebDriver driver, By locator) { Actions builder = new Actions(driver); builder.moveToElement(driver.findElement(locator)).perform(); }
http://www.51testing.com/html/18/631118-861557.html
//悬浮到上方点击
builder.moveToElement(e);
builder.click().perform();