本文整理了Java中org.xwiki.test.ui.XWikiWebDriver.hasElement()
方法的一些代码示例,展示了XWikiWebDriver.hasElement()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XWikiWebDriver.hasElement()
方法的具体详情如下:
包路径:org.xwiki.test.ui.XWikiWebDriver
类名称:XWikiWebDriver
方法名:hasElement
[英]Should be used when the result is supposed to be true (otherwise you'll incur the timeout and an error will be raised!).
[中]应该在结果应该为真时使用(否则会导致超时并引发错误!)。
代码示例来源:origin: phenotips/phenotips
public boolean hasPhenotypeSelected(String label, boolean positive)
{
return getDriver().hasElement(
By.xpath("//*[contains(@class, 'phenotype-info')]//*[contains(text(),'" + (positive ? "" : "NO ") + label
+ "')]"));
}
代码示例来源:origin: org.xwiki.platform/xwiki-platform-administration-test-pageobjects
public boolean hasCategoryWithId(String categoryId)
{
return getDriver().hasElement(this.container, categoryById(categoryId));
}
代码示例来源:origin: org.xwiki.platform/xwiki-platform-administration-test-pageobjects
public boolean hasSectionWithId(String sectionId)
{
return getDriver().hasElement(this.container, sectionById(sectionId));
}
代码示例来源:origin: org.xwiki.platform/xwiki-platform-administration-test-pageobjects
public boolean hasCategoryWithName(String categoryName)
{
return getDriver().hasElement(this.container, categoryByName(categoryName));
}
代码示例来源:origin: org.xwiki.platform/xwiki-platform-administration-test-pageobjects
public boolean hasSectionWithName(String categoryName, String sectionName)
{
return getDriver().hasElement(this.container, sectionByName(categoryName, sectionName));
}
代码示例来源:origin: phenotips/phenotips
public boolean hasActiveGroups()
{
return getDriver().hasElement(this.activeGroupsGadget, By.cssSelector("tr"));
}
代码示例来源:origin: phenotips/phenotips
public boolean hasGroupManagement()
{
return getDriver().hasElement(this.activeGroupsGadget, By.xpath(".//a[contains(text(), 'Manage groups')]"));
}
代码示例来源: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: 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;
}
}
内容来源于网络,如有侵权,请联系作者删除!