这就是我在代码中这样做的方式。
WebDriverWait wait = new WebDriverWait(webDriver, timeoutInSeconds);wait.until(ExpectedConditions.visibilityOfElementLocated(By.id<locator>));
要么
wait.until(ExpectedConditions.elementToBeClickable(By.id<locator>));
确切地说。

这就是我在代码中这样做的方式。
WebDriverWait wait = new WebDriverWait(webDriver, timeoutInSeconds);wait.until(ExpectedConditions.visibilityOfElementLocated(By.id<locator>));
要么
wait.until(ExpectedConditions.elementToBeClickable(By.id<locator>));
确切地说。