code: 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;
      }
docs: Waits until the expectations are full filled or timeout runs out
  
  @param condition The conditions the element should meet
  @param timeout The timeout to wait
  @return True if element meets the condition