(1)  new WebDriverWait(driver, 10). until(ExpectedConditions.elementToBeClickable(locator));

 

(2)  new WebDriverWait(driver, 10). until(ExpectedConditions.visibilityOf(locator));

 

(3)  new WebDriverWait(driver, 10). until(ExpectedConditions.presenceOfElementLocated(locator);

 

(4)

       Function<WebDriver, WebElement> waitFn = new Function<WebDriver, WebElement>() {

            @Override

            public WebElement apply(WebDriver driver) {

                return el.findElement(By.cssSelector("div.rptstatus.rptcomplete"));

            }

        };

        //Detect every 2 seconds,  the maximum time  is 120 seconds

       WebDriverWait wait = new WebDriverWait(driver, 120, 2);

       wait.withMessage("A processing icon should display in the Status column in the row.”)

       wait.until(waitFn);

相关文章:

  • 2021-10-05
  • 2022-12-23
  • 2021-11-05
  • 2022-12-23
  • 2021-06-11
  • 2022-12-23
  • 2021-08-19
  • 2022-12-23
猜你喜欢
  • 2021-07-07
  • 2022-02-08
  • 2021-08-13
  • 2022-12-23
  • 2021-07-30
  • 2021-11-19
相关资源
相似解决方案