org.xwiki.test.ui.XWikiWebDriver.hasElementWithoutWaiting()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(5.3k)|赞(0)|评价(0)|浏览(96)

本文整理了Java中org.xwiki.test.ui.XWikiWebDriver.hasElementWithoutWaiting()方法的一些代码示例,展示了XWikiWebDriver.hasElementWithoutWaiting()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XWikiWebDriver.hasElementWithoutWaiting()方法的具体详情如下:
包路径:org.xwiki.test.ui.XWikiWebDriver
类名称:XWikiWebDriver
方法名:hasElementWithoutWaiting

XWikiWebDriver.hasElementWithoutWaiting介绍

[英]Same as #hasElementWithoutWaiting(By) but don't scroll to make the element visible. Useful for example whenverifying that the page has finished loading (and thus there's no element visible and we cannot scroll to it).
[中]与#haseElement Without Waiting(By)相同,但不要滚动以使元素可见。例如,当验证页面已完成加载(因此没有可见元素,我们无法滚动到它)时,这很有用。

代码示例

代码示例来源:origin: org.xwiki.platform/xwiki-platform-test-ui

/**
 * @return true if we are currently logged in, false otherwise
 */
public boolean isAuthenticated()
{
  return getDriver().hasElementWithoutWaiting(By.id("tmUser"));
}

代码示例来源:origin: org.xwiki.platform/xwiki-platform-test-ui

/**
 * @return if the "affect children" option is present or not
 * @since 7.2RC1 
 */
public boolean hasAffectChildrenOption()
{
  return getDriver().hasElementWithoutWaiting(By.id("affectChildren"));
}

代码示例来源:origin: org.xwiki.platform/xwiki-platform-test-ui

/**
 * Says if the notifications menu is present (it is displayed only if it has some content).
 * 
 * @return either or not the notifications menu is present
 * @since 7.4M1
 */
public boolean hasNotificationsMenu()
{
  return getDriver().hasElementWithoutWaiting(By.id("tmNotifications"));
}

代码示例来源:origin: org.xwiki.platform/xwiki-platform-test-ui

public boolean isInViewMode()
{
  return !getDriver().hasElementWithoutWaiting(By.id("editMeta"));
}

代码示例来源:origin: org.xwiki.platform/xwiki-platform-administration-test-pageobjects

public boolean isPasswordSuccessfullyReset()
{
  // success = no form and a message that is not error or warning.
  return !getDriver().hasElementWithoutWaiting(By.cssSelector(".xcontent form"))
    && messageBox.getAttribute("class").contains("infomessage");
}

代码示例来源:origin: org.xwiki.platform/xwiki-platform-administration-test-pageobjects

public boolean isResetPasswordSent()
{
  // If there is no form and we see an info box, then the request was sent.
  return !getDriver().hasElementWithoutWaiting(By.cssSelector(".xcontent form"))
    && messageBox.getAttribute("class").contains("infomessage");
}

代码示例来源:origin: org.xwiki.platform/xwiki-platform-test-ui

public String getLoggedInUserName()
{
  By userAvatarInDrawer = By.id("tmUser");
  if (!getDriver().hasElementWithoutWaiting(userAvatarInDrawer)) {
    // Guest
    return null;
  }
  WebElement element = getDriver().findElementWithoutWaiting(userAvatarInDrawer);
  String href = element.getAttribute("href");
  String loggedInUserName = href.substring(href.lastIndexOf("/") + 1);
  // Return
  return loggedInUserName;
}

代码示例来源:origin: org.xwiki.platform/xwiki-platform-test-ui

/**
   * @param panelTitle the panel displayed title
   * @return true if the panel is visible in the left panels or false otherwise
   * @since 10.6RC1
   */
  public boolean hasLeftPanel(String panelTitle)
  {
    return getDriver().hasElementWithoutWaiting(By.xpath(
      "//div[@id = 'leftPanels']/div/h1[@class = 'xwikipaneltitle' and text() = '" + panelTitle +"']"));
  }
}

代码示例来源:origin: org.xwiki.platform/xwiki-platform-test-ui

/**
 * @return the presence of the previous change button of the original document
 */
public boolean hasPreviousFromVersion()
{
  return getDriver().hasElementWithoutWaiting(By.cssSelector(previousFromVersionSelector));
}

代码示例来源:origin: org.xwiki.platform/xwiki-platform-test-ui

/**
 * @return the presence of the previous change button
 */
public boolean hasPreviousChange()
{
  return getDriver().hasElementWithoutWaiting(By.cssSelector(previousChangeSelector));
}

代码示例来源:origin: org.xwiki.platform/xwiki-platform-test-ui

/**
 * @return the presence of the next change button
 */
public boolean hasNextChange()
{
  return getDriver().hasElementWithoutWaiting(By.cssSelector(nextChangeSelector));
}

代码示例来源:origin: org.xwiki.platform/xwiki-platform-test-ui

/**
 * @return the presence of the next change button of the original document
 */
public boolean hasNextFromVersion()
{
  return getDriver().hasElementWithoutWaiting(By.cssSelector(nextFromVersionSelector));
}

代码示例来源:origin: org.xwiki.platform/xwiki-platform-test-ui

/**
 * @return the presence of the previous change button of the new document
 */
public boolean hasPreviousToVersion()
{
  return getDriver().hasElementWithoutWaiting(By.cssSelector(previousToVersionSelector));
}

代码示例来源:origin: org.xwiki.platform/xwiki-platform-test-ui

/**
 * @return the presence of the next change button of the new document
 */
public boolean hasNextToVersion()
{
  return getDriver().hasElementWithoutWaiting(By.cssSelector(nextToVersionSelector));
}

代码示例来源:origin: org.xwiki.platform/xwiki-platform-administration-test-pageobjects

/**
 * To be called the first time the page is opened, using a password reset link.
 *
 * @return true if the reset link is valid and the form to change the password is being displayed, false otherwise.
 */
public boolean isResetLinkValid()
{
  // If we see the form, the the link is valid.
  return getDriver().hasElementWithoutWaiting(By.cssSelector(".xcontent form"));
}

代码示例来源:origin: org.xwiki.platform/xwiki-platform-test-ui

/**
 * @since 4.5M1
 */
public boolean canDelete()
{
  toggleActionMenu();
  // Don't wait here since test can use this method to verify that there's no Delete right on the current page
  // and calling hasElement() would incurr the wait timeout.
  boolean canDelete = getDriver().hasElementWithoutWaiting(By.id("tmActionDelete"));
  toggleActionMenu();
  return canDelete;
}

相关文章