public boolean waitForExpectedCondition ( ExpectedCondition < ? > condition , int timeout ) { WebDriver driver = getWebDriver ( ) ; boolean conditionMet = true ; try { new WebDriverWait ( driver , timeout ) . until ( condition ) ; } catch ( TimeoutException e ) { conditionMet = false ; } return conditionMet ; }
Waits until the expectations are full filled or timeout runs out