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

    liferaySelenium.assertElementPresent(selectLocator);

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

      throw new Exception(
          "Pattern \"" + pattern + "\" matches \"" + text + "\" at \"" + selectLocator + "\"");
    }
  }
  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);
    }
  }