selenium菜单操作
连接到前端这个菜单下面的HTML/CSS子菜单
driver.get("https://www.imooc.com"); WebElement login = driver.findElement(By.className("menuContent")); List<WebElement> items = login.findElements(By.className("item")); Actions actions = new Actions(driver); actions.moveToElement(items.get(1)).perform(); driver.findElement(By.linkText("HTML/CSS")).click();