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

    liferaySelenium.assertElementPresent(locator);

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

      throw new Exception("\"" + text + "\" contains \"" + pattern + "\" at \"" + locator + "\"");
    }
  }
コード例 #2
0
  public static void waitForPartialText(
      LiferaySelenium liferaySelenium, String locator, String value) throws Exception {

    value = RuntimeVariables.replace(value);

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

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

      Thread.sleep(1000);
    }
  }
コード例 #3
0
  public static boolean isNotPartialText(
      LiferaySelenium liferaySelenium, String locator, String value) {

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