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

    liferaySelenium.assertElementPresent(locator);

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

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

    value = RuntimeVariables.replace(value);

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

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

      Thread.sleep(1000);
    }
  }