答案 0 :(得分:1)
WebDriver wait = new WebDriver(Driver, Seconds);
boolean status;
status = wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("")))!= null;
答案 1 :(得分:1)
请尝试以下代码。
WebDriverWait wait = new WebDriverWait(driver, 15); //add Explicit Wait
wait.until(ExpectedConditions.elementToBeClickable(driver.findElement(By.xpath("Your xpath"))));
driver.findElement(By.xpath("Your xpath")).click(); //After Explicit Wait Click on WebElement
答案 2 :(得分:0)
* {
margin : 0;
padding: 0;
}