Wait Till Text Present In Text Field

前端 未结 6 979
死守一世寂寞
死守一世寂寞 2020-12-05 15:27

In webdriver, how to ask to webdriver to wait until text is present in text field.

actually i have one kendo text field whose values comes from database which takes

6条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-05 15:59

    Using WebDriverWait (org.openqa.selenium.support.ui.WebDriverWait) and ExpectedCondition (org.openqa.selenium.support.ui.ExpectedConditions) objects

    WebDriverWait wait = new WebDriverWait(driver, 30);
    wait.until(ExpectedConditions.textToBePresentInElementLocated(By.id("element_id"), "The Text"));
    

提交回复
热议问题