public static void assertValue(LiferaySelenium liferaySelenium, String locator, String pattern)
      throws Exception {

    liferaySelenium.assertElementPresent(locator);

    if (liferaySelenium.isNotValue(locator, pattern)) {
      String value = liferaySelenium.getValue(locator);

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

    value = RuntimeVariables.replace(value);

    for (int second = 0; ; second++) {
      if (second >= PropsValues.TIMEOUT_EXPLICIT_WAIT) {
        liferaySelenium.assertNotValue(locator, value);
      }

      try {
        if (liferaySelenium.isNotValue(locator, value)) {
          break;
        }
      } catch (Exception e) {
      }

      Thread.sleep(1000);
    }
  }