0

32

我用来悬停并单击的以下代码

 Actions actions = new Actions(driver)
 WebElement Mainmenu = driver.findElement(By.xpath(".//*[@id='nav']/li[6]/a"))
 WebElement Submenu = driver.findElement(By.xpath(".//*[@id='nav']/li[6]/ul/li[1]/a"));
 WebElement Childsubmenu = driver.findElement(By.xpath(".//*[@id='nav']/li[6]/ul/li[1]/ul/li[1]/a"));
      actions.moveToElement(Mainmenu).moveToElement(Submenu).moveToElement(Childsubmenu).click().build().perform();

它在 Chrome 中运行良好,但在 Firefox 22 中无法运行。

4

0 回答 0