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

    liferaySelenium.assertElementPresent(locator);

    if (liferaySelenium.isText(locator, pattern)) {
      String text = liferaySelenium.getText(locator);

      throw new Exception(
          "Pattern \"" + pattern + "\" matches \"" + text + "\" at \"" + locator + "\"");
    }
  }
  public static void waitForText(LiferaySelenium liferaySelenium, String locator, String value)
      throws Exception {

    value = RuntimeVariables.replace(value);

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

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

      Thread.sleep(1000);
    }
  }
  public static boolean isNotText(LiferaySelenium liferaySelenium, String locator, String value) {

    return !liferaySelenium.isText(locator, value);
  }