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

    if (liferaySelenium.isElementPresent(locator)) {
      throw new Exception("Element is present at \"" + locator + "\"");
    }
  }
  public static boolean isElementPresentAfterWait(LiferaySelenium liferaySelenium, String locator)
      throws Exception {

    for (int second = 0; ; second++) {
      if (second >= PropsValues.TIMEOUT_EXPLICIT_WAIT) {
        return liferaySelenium.isElementPresent(locator);
      }

      if (liferaySelenium.isElementPresent(locator)) {
        break;
      }

      Thread.sleep(1000);
    }

    return liferaySelenium.isElementPresent(locator);
  }
  public static void waitForElementPresent(LiferaySelenium liferaySelenium, String locator)
      throws Exception {

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

      try {
        if (liferaySelenium.isElementPresent(locator)) {
          break;
        }
      } catch (Exception e) {
      }

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

    return !liferaySelenium.isElementPresent(locator);
  }