コード例 #1
0
  public static void assertVisible(LiferaySelenium liferaySelenium, String locator)
      throws Exception {

    liferaySelenium.assertElementPresent(locator);

    if (liferaySelenium.isNotVisible(locator)) {
      throw new Exception("Element is not visible at \"" + locator + "\"");
    }
  }
コード例 #2
0
  public static void waitForNotVisible(LiferaySelenium liferaySelenium, String locator)
      throws Exception {

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

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

      Thread.sleep(1000);
    }
  }