gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-22 09:55:05 24 4
gpt4 key购买 nike

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

XWikiWebDriver.waitUntilElementDisappears介绍

[英]Waits until the given locator corresponds to either a hidden or a deleted element.
[中]等待,直到给定的定位器对应于隐藏或删除的元素。

代码示例

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

/**
 * Waits until the given locator corresponds to either a hidden or a deleted element.
 *
 * @param locator the locator to wait for
 */
public void waitUntilElementDisappears(final By locator)
{
  waitUntilElementDisappears(null, locator);
}

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

public void waitUntilPreviewIsLoaded()
  {
    getDriver().waitUntilElementDisappears(By.id("preview-curtain"));
  }
}

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

public void waitUntilPreviewIsLoaded()
{
  getDriver().waitUntilElementDisappears(By.id("preview-curtain"));
}

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

/**
 * @return true if the drawer used to be displayed
 * @since 8.4.5
 * @since 9.0RC1
 */
public boolean hideDrawer()
{
  if (isElementVisible(DRAWER_MATCHER)) {
    // The drawer is visible, so we close it by clicking outside the drawer
    this.mainContainerDiv.click();
    getDriver().waitUntilElementDisappears(DRAWER_MATCHER);
    return true;
  }
  return false;
}

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

/**
 * Wait until the copy operation finishes.
 * 
 * @return this page
 */
public CopyOrRenameOrDeleteStatusPage waitUntilFinished()
{
  getDriver().waitUntilElementDisappears(By.cssSelector(".job-status .ui-progress"));
  return this;
}

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

/**
 * @since 7.2M3
 */
public void toggleDrawer()
{
  if (isElementVisible(DRAWER_MATCHER)) {
    // The drawer is visible, so we close it by clicking outside the drawer
    this.mainContainerDiv.click();
    getDriver().waitUntilElementDisappears(DRAWER_MATCHER);
  } else {
    // The drawer is not visible, so we open it
    this.drawerActivator.click();
    getDriver().waitUntilElementIsVisible(DRAWER_MATCHER);
  }
}

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

public void removeAllDeprecatedProperties()
{
  getDriver().findElement(By.className("syncAllProperties")).click();
  getDriver().waitUntilElementDisappears(By.className("deprecatedProperties"));
}

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

public void expand()
{
  // Remember the id of the container so that we can retrieve it when it will be removed and re-inserted.
  final String containerId = this.container.getAttribute("id");
  clickPathElement("…");
  // Expanding the breadcrumb remove the current container and replace it by an updated one (with the full
  // hierarchy inside). So we wait until the container is re-inserted without any "ellipsis" item.
  getDriver().waitUntilElementDisappears(By.cssSelector("#" + containerId + " .ellipsis"));
  // Update the internal reference
  this.container = getDriver().findElementById(containerId);
}

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

public void deleteProperty(String propertyName)
{
  final By propertyLocator = By.id("xproperty_" + propertyName);
  final WebElement propertyContainer = getDriver().findElement(propertyLocator);
  WebElement deleteLink = propertyContainer.findElement(By.className("delete"));
  deleteLink.click();
  // Expect a confirmation box
  getDriver().waitUntilElementIsVisible(By.className("xdialog-box-confirmation"));
  getDriver().findElement(By.cssSelector(".xdialog-box-confirmation input[value='Yes']")).click();
  getDriver().waitUntilElementDisappears(propertyLocator);
}

代码示例来源:origin: org.phenotips/patient-data-pageobjects

public boolean checkAllPhenotypesCollapsed()
{
  this.getDriver().waitUntilElementDisappears(
    By.cssSelector("label[for='PhenoTips.PatientClass_0_phenotype_HP:0001363]"));
  try {
    getDriver().findElement(By.cssSelector("label[for='PhenoTips.PatientClass_0_phenotype_HP:0001363]"));
    return true;
  } catch (NoSuchElementException e) {
    return false;
  }
}

代码示例来源:origin: phenotips/phenotips

public boolean checkAllPhenotypesCollapsed()
{
  this.getDriver().waitUntilElementDisappears(
    By.cssSelector("label[for='PhenoTips.PatientClass_0_phenotype_HP:0001363]"));
  try {
    getDriver().findElement(By.cssSelector("label[for='PhenoTips.PatientClass_0_phenotype_HP:0001363]"));
    return true;
  } catch (NoSuchElementException e) {
    return false;
  }
}

代码示例来源:origin: org.phenotips/patient-data-pageobjects

public boolean checkImmunodeficiencyDissapearsFromRightInvestigateBox()
{
  this.getDriver().waitUntilElementDisappears(By
    .xpath(
      "//*[contains(@class, 'background-search')]//label[contains(@class, 'yes')][.//input[@value = 'HP:0002721']]"));
  try {
    return !getUtil()
      .hasElement(
        By.xpath(
          "//*[contains(@class, 'background-search')]//label[contains(@class, 'yes')][.//input[@value = 'HP:0002721']]"));
  } catch (NoSuchElementException e) {
    return false;
  }
}

代码示例来源:origin: org.phenotips/patient-data-pageobjects

public boolean checkBifidTongueDissapearsFromRightInvestigateBox()
{
  this.getDriver().waitUntilElementDisappears(By
    .xpath(
      "//*[contains(@class, 'background-search')]//label[contains(@class, 'yes')][.//input[@value = 'HP:0010297']]"));
  try {
    return !getUtil()
      .hasElement(
        By.xpath(
          "//*[contains(@class, 'background-search')]//label[contains(@class, 'yes')][.//input[@value = 'HP:0010297']]"));
  } catch (NoSuchElementException e) {
    return false;
  }
}

代码示例来源:origin: org.phenotips/patient-data-pageobjects

public boolean checkAbnormalityOfTheCartoidArteriesDissapearsFromRightInvestigateBox()
{
  this.getDriver().waitUntilElementDisappears(By
    .xpath(
      "//*[contains(@class, 'background-search')]//label[contains(@class, 'yes')][.//input[@value = 'HP:0005344']]"));
  try {
    return !getUtil()
      .hasElement(
        By.xpath(
          "//*[contains(@class, 'background-search')]//label[contains(@class, 'yes')][.//input[@value = 'HP:0005344']]"));
  } catch (NoSuchElementException e) {
    return false;
  }
}

代码示例来源:origin: org.phenotips/patient-data-pageobjects

public boolean checkPolyphagiaDissapearsFromRightInvestigateBox()
{
  this.getDriver().waitUntilElementDisappears(By
    .xpath(
      "//*[@class = 'background-search']//*[@class = 'phenotype'][//label[@class = 'yes']][//input[@value = 'HP:0002591']]//*[@class = 'initialized']//*[@class = 'yes-no-picker-label'][text() = 'polyphagia']"));
  try {
    getDriver()
      .findElement(
        By.xpath(
          "//*[@class = 'background-search']//*[@class = 'phenotype'][//label[@class = 'yes']][//input[@value = 'HP:0002591']]//*[@class = 'initialized']//*[@class = 'yes-no-picker-label'][text() = 'polyphagia']"));
    return true;
  } catch (NoSuchElementException e) {
    return false;
  }
}

代码示例来源:origin: phenotips/phenotips

public boolean checkImmunodeficiencyDissapearsFromRightInvestigateBox()
{
  this.getDriver().waitUntilElementDisappears(By
    .xpath(
      "//*[contains(@class, 'background-search')]//label[contains(@class, 'yes')][.//input[@value = 'HP:0002721']]"));
  try {
    return !getDriver()
      .hasElement(
        By.xpath(
          "//*[contains(@class, 'background-search')]//label[contains(@class, 'yes')][.//input[@value = 'HP:0002721']]"));
  } catch (NoSuchElementException e) {
    return false;
  }
}

代码示例来源:origin: phenotips/phenotips

public boolean checkBifidTongueDissapearsFromRightInvestigateBox()
{
  this.getDriver().waitUntilElementDisappears(By
    .xpath(
      "//*[contains(@class, 'background-search')]//label[contains(@class, 'yes')][.//input[@value = 'HP:0010297']]"));
  try {
    return !getDriver()
      .hasElement(
        By.xpath(
          "//*[contains(@class, 'background-search')]//label[contains(@class, 'yes')][.//input[@value = 'HP:0010297']]"));
  } catch (NoSuchElementException e) {
    return false;
  }
}

代码示例来源:origin: phenotips/phenotips

public boolean checkAbnormalityOfTheCartoidArteriesDissapearsFromRightInvestigateBox()
{
  this.getDriver().waitUntilElementDisappears(By
    .xpath(
      "//*[contains(@class, 'background-search')]//label[contains(@class, 'yes')][.//input[@value = 'HP:0005344']]"));
  try {
    return !getDriver()
      .hasElement(
        By.xpath(
          "//*[contains(@class, 'background-search')]//label[contains(@class, 'yes')][.//input[@value = 'HP:0005344']]"));
  } catch (NoSuchElementException e) {
    return false;
  }
}

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

/**
 * Deletes the corresponding file name.
 * 
 * @param attachmentName the name of the attachment to be deleted
 */
public void deleteAttachmentByFileByName(String attachmentName)
{
  // We initialize before so we can remove the animation before the modal is shown
  this.confirmDelete = new ConfirmationModal(By.id("deleteAttachment"));
  getDriver().findElement(By.xpath("//div[@id='attachmentscontent']//a[text()='" + attachmentName
    + "']/../../div[contains(@class, 'xwikibuttonlinks')]/a[contains(@class,'deletelink')]")).click();
  this.confirmDelete.clickOk();
  getDriver().waitUntilElementDisappears(
    By.xpath("//div[@id='attachmentscontent']//a[text()='" + attachmentName + "']"));
  getDriver().waitUntilElementIsVisible(By.xpath("//div[@id='Attachmentspane']"));
}

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

/**
 * @since 4.3M2
 */
public void deleteObject(By objectLocator)
{
  final WebElement objectContainer = getDriver().findElement(objectLocator);
  WebElement deleteLink = objectContainer.findElement(By.className("delete"));
  deleteLink.click();
  // Expect a confirmation box
  getDriver().waitUntilElementIsVisible(By.className("xdialog-box-confirmation"));
  getDriver().findElement(By.cssSelector(".xdialog-box-confirmation input[value='Yes']")).click();
  getDriver().waitUntilElementDisappears(objectLocator);
}

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com