public static void waitForSelectedLabel(
      LiferaySelenium liferaySelenium, String selectLocator, String pattern) throws Exception {

    for (int second = 0; ; second++) {
      if (second >= PropsValues.TIMEOUT_EXPLICIT_WAIT) {
        liferaySelenium.assertSelectedLabel(selectLocator, pattern);
      }

      try {
        if (liferaySelenium.isSelectedLabel(selectLocator, pattern)) {
          break;
        }
      } catch (Exception e) {
      }

      Thread.sleep(1000);
    }
  }