2
我在使用webdriver代码的IE中遇到了鼠标悬停的问题,它在Chrome和Firefox中工作正常,但鼠标悬停问题只发生在IE中。我该如何解决这个问题?首先焦点的元素上,并在旁边,我会点击链接,请参见下面的代码,selenium webdriver中的IE问题?
WebElement newbutton = driver.findElement(By.xpath("//html/body/div/span/form[2]/div/div/div[3]/div[2]/ul/span/li"));
Actions action = new Actions(driver);
action.moveToElement(newbutton).build().perform();
WebElement nextButton=driver.findElement(By.xpath(".//*[@id='menuFmId:headerForm:j_id130']/li/span"));
Actions action1 = new Actions(driver);
action1.moveToElement(nextButton).click(nextButton).build().perform();
请发布您的HTML代码,以便人们能够更好地理解问题出在哪里,因为您在第一个按钮中使用绝对xpath可能在IE中没有检测到它,必须查看代码。 –