本文整理了Java中org.xwiki.test.ui.XWikiWebDriver.findElementWithoutWaiting()
方法的一些代码示例,展示了XWikiWebDriver.findElementWithoutWaiting()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XWikiWebDriver.findElementWithoutWaiting()
方法的具体详情如下:
包路径:org.xwiki.test.ui.XWikiWebDriver
类名称:XWikiWebDriver
方法名:findElementWithoutWaiting
[英]Same as #findElementWithoutWaiting(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).
[中]与#findelement without waiting(By)相同,但不要滚动以使元素可见。例如,当验证页面已完成加载(因此没有可见元素,我们无法滚动到它)时,这很有用。
代码示例来源:origin: org.xwiki.platform/xwiki-platform-test-ui
public boolean hasElementWithoutWaiting(By by)
{
try {
findElementWithoutWaiting(by);
return true;
} catch (NoSuchElementException e) {
return false;
}
}
代码示例来源:origin: org.xwiki.platform/xwiki-platform-test-ui
public boolean hasElementWithoutWaiting(WebElement element, By by)
{
try {
findElementWithoutWaiting(element, by);
return true;
} catch (NoSuchElementException e) {
return false;
}
}
代码示例来源:origin: org.xwiki.platform/xwiki-platform-test-ui
/**
* @since 5.3RC1
*/
public WebElement getRow(int rowNumber)
{
WebElement liveTableBody = getDriver().findElementWithoutWaiting(By.id(this.livetableId + "-display"));
return getDriver().findElementWithoutWaiting(liveTableBody, By.xpath("tr[" + rowNumber + "]"));
}
代码示例来源:origin: org.xwiki.platform/xwiki-platform-test-ui
private void selectVersions(String fromVersion, String toVersion)
{
String versionXPath = ".//input[@name = 'rev%s' and @value = '%s']";
getDriver().findElementWithoutWaiting(pane, By.xpath(String.format(versionXPath, 1, fromVersion))).click();
getDriver().findElementWithoutWaiting(pane, By.xpath(String.format(versionXPath, 2, toVersion))).click();
}
代码示例来源:origin: org.xwiki.platform/xwiki-platform-test-ui
/**
* @return the text of uncaught errors
* @since 8.0M1
*/
public String getErrorContent()
{
return getDriver()
.findElementWithoutWaiting(By.xpath("//div[@id = 'mainContentArea']/pre[contains(@class, 'xwikierror')]"))
.getText();
}
代码示例来源:origin: org.xwiki.platform/xwiki-platform-test-ui
/**
* Selects and creates an element with the input text.
*
* @return the current suggest input element
*/
public SuggestInputElement selectTypedText()
{
getDriver().findElementWithoutWaiting(By.cssSelector(".selectize-dropdown.active .create")).click();
return this;
}
代码示例来源:origin: phenotips/phenotips
public void selectPhenotype(String id, boolean positive)
{
getDriver().findElementWithoutWaiting(
By.cssSelector("label[for='PhenoTips.PatientClass_0_" + (positive ? "" : "negative_") + "phenotype_"
+ id + "']"))
.click();
}
代码示例来源:origin: org.xwiki.platform/xwiki-platform-test-ui
/**
* Selects an element by clicking on the suggestion with the given position.
*
* @return the current suggest input element
*/
public SuggestInputElement selectByIndex(int index)
{
getDriver().findElementWithoutWaiting(
By.xpath("//*[contains(@class, 'selectize-dropdown') and contains(@class, 'active')]"
+ "//*[contains(@class, 'xwiki-selectize-option')][" + (index + 1) + "]"))
.click();
return this;
}
代码示例来源:origin: org.xwiki.platform/xwiki-platform-administration-test-pageobjects
public String getMemberCount(String groupName)
{
String xpath = "//table[@id = 'groupstable']//td[contains(@class, 'name') and normalize-space(.) = '"
+ groupName + "']/following-sibling::td[contains(@class, 'members')]";
return getDriver().findElementWithoutWaiting(By.xpath(xpath)).getText();
}
}
代码示例来源:origin: org.xwiki.platform/xwiki-platform-test-ui
/**
* @return the actual text input
*/
private WebElement getTextInput()
{
return getDriver().findElementWithoutWaiting(this.container, By.cssSelector(".selectize-input > input"));
}
代码示例来源:origin: org.xwiki.platform/xwiki-platform-administration-test-pageobjects
public WebElement getAddButton()
{
return getDriver()
.findElementWithoutWaiting(By.cssSelector(".paths input[name='" + this.name + "'] + a[href='#path-add']"));
}
代码示例来源:origin: org.xwiki.platform/xwiki-platform-test-ui
/**
* Clicks on the reply icon near the specified comment.
*
* @param id identifies the comment to reply to
* @return the form used to reply
*/
public CommentForm replyToCommentByID(int id)
{
getDriver().findElementWithoutWaiting(
By.xpath("//div[@id='xwikicomment_" + id + "']//a[contains(@class, 'commentreply')]")).click();
return getAddCommentForm();
}
代码示例来源:origin: org.xwiki.platform/xwiki-platform-repository-test-pageobjects
public ExtensionPage clickExtensionName(String name)
{
getDriver().findElementWithoutWaiting(By.linkText(name)).click();
return new ExtensionPage();
}
}
代码示例来源:origin: org.xwiki.platform/xwiki-platform-test-ui
/**
* @return the number of rows in the live table
*/
public int getRowCount()
{
WebElement liveTableBody = getDriver().findElementWithoutWaiting(By.id(this.livetableId + "-display"));
// We use XPath because we're interested only in the direct children.
return getDriver().findElementsWithoutWaiting(liveTableBody, By.xpath("tr")).size();
}
代码示例来源:origin: org.xwiki.platform/xwiki-platform-test-ui
public void clickOk()
{
getDriver().findElementWithoutWaiting(this.container,
By.cssSelector(".modal-footer .btn-primary, .modal-footer .btn-danger")).click();
this.waitForClosed();
}
代码示例来源:origin: org.xwiki.platform/xwiki-platform-administration-test-pageobjects
public RegistrationModal clickEditUser(String userName)
{
getDriver().findElementWithoutWaiting(By.xpath(String.format(USER_ACTION_XPATH_FORMAT, userName, "edit")))
.click();
return new RegistrationModal().waitUntilPageIsLoaded();
}
}
代码示例来源:origin: org.xwiki.platform/xwiki-platform-test-ui
public SuggestInputElement(WebElement originalInput)
{
this.originalInput = originalInput;
// Wait for the original input element to be enhanced.
getDriver().waitUntilCondition(driver -> this.originalInput.getAttribute("class").contains("selectized"));
this.container = getDriver().findElementWithoutWaiting(this.originalInput,
By.xpath("following-sibling::*[contains(@class, 'selectize-control')][1]"));
// Wait for the selection to be initialized.
getDriver().waitUntilCondition(driver -> !this.container.getAttribute("class").contains("loading"));
}
代码示例来源:origin: org.xwiki.platform/xwiki-platform-test-ui
/**
* Opens the date picker for the specified date property of the edited object.
*
* @param datePropertyName the name of a date property of the edited object
* @return the date picker
*/
public DatePicker openDatePicker(String datePropertyName)
{
getDriver().findElementWithoutWaiting(getForm(), byPropertyName(datePropertyName)).click();
return new DatePicker();
}
代码示例来源:origin: org.xwiki.platform/xwiki-platform-test-ui
/**
* @param userPropertyName the name of a property
* @return a {@link SuggestInputElement suggest input} for the given property
*/
public SuggestInputElement getSuggestInput(String userPropertyName)
{
return new SuggestInputElement(
getDriver().findElementWithoutWaiting(getForm(), byPropertyName(userPropertyName)));
}
代码示例来源:origin: org.xwiki.platform/xwiki-platform-test-ui
public HistoryPane deleteRangeVersions(String fromVersion, String toVersion)
{
getDriver().makeConfirmDialogSilent(true);
this.selectVersions(fromVersion, toVersion);
getDriver().findElementWithoutWaiting(pane, By.xpath(".//input[@name = 'deleteVersions']")).click();
return new HistoryPane();
}
内容来源于网络,如有侵权,请联系作者删除!