waitPath.until(ExpectedConditions.visibilityOfElementLocated(By.id("Table1")));
WebElement we1 = pathfinderdriver.findElement(By.id("Table1"));
waitPath.until(ExpectedConditions.visibilityOfElementLocated(By.id("Table3")));
即使我已经检查过以下代码,但有时它也会失败。
while(!(we1.findElement(By.id("Table3")).isDisplayed() ))
{
Thread.sleep(3000);
}
Thread.sleep(5000);
WebElement we2 = we1.findElement(By.id("Table3"));
答案 0 :(得分:0)
尝试使用xpath之类的另一种方法来获取元素。 ExpectedConditions.visibilityOfElementLocated(By)