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

    liferaySelenium.assertElementPresent(selectLocator);

    if (liferaySelenium.isNotSelectedLabel(selectLocator, pattern)) {
      String text = liferaySelenium.getSelectedLabel(selectLocator);

      throw new Exception(
          "Pattern \""
              + pattern
              + "\" does not match \""
              + text
              + "\" at \""
              + selectLocator
              + "\"");
    }
  }
  public static void waitForNotSelectedLabel(
      LiferaySelenium liferaySelenium, String selectLocator, String pattern) throws Exception {

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

      try {
        if (liferaySelenium.isNotSelectedLabel(selectLocator, pattern)) {

          break;
        }
      } catch (Exception e) {
      }

      Thread.sleep(1000);
    }
  }