WebElement element = driver.findElement(By.id("liOrganizations"));
Actions builder = new Actions(driver);
Action mouseOver = builder.moveToElement(element).build();
mouseOver.perform();
Firefox 版本:18.0.2 硒:2.30.0
WebElement element = driver.findElement(By.id("liOrganizations"));
Actions builder = new Actions(driver);
Action mouseOver = builder.moveToElement(element).build();
mouseOver.perform();
Firefox 版本:18.0.2 硒:2.30.0
WebElement element = driver.findElement(By.id("liOrganizations"));
新动作(驱动程序).moveToElement(mo).perform();
线程.sleep(2000);
你试过这个:
Actions action = new Actions(webdriver);
WebElement we = webdriver.findElement(By.xpath("xpath"));
action.moveToElement(we).build().perform();