本文整理了Java中org.openqa.selenium.By.partialLinkText()
方法的一些代码示例,展示了By.partialLinkText()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。By.partialLinkText()
方法的具体详情如下:
包路径:org.openqa.selenium.By
类名称:By
方法名:partialLinkText
暂无
代码示例来源:origin: selenide/selenide
/**
* @see By#partialLinkText(java.lang.String)
* @since 3.1
*/
public static By byPartialLinkText(String partialLinkText) {
return By.partialLinkText(partialLinkText);
}
代码示例来源:origin: appium/java-client
@Override By getBy(Annotation annotation) {
return By
.partialLinkText(getValue(annotation, this));
}
},
代码示例来源:origin: la-team/light-admin
private WebElement getScope( String scopeLabel ) {
return webDriver().findElement( By.partialLinkText( scopeLabel ) );
}
代码示例来源:origin: jenkinsci/acceptance-test-harness
/**
* @param linkText The text to match against
* @return a By which locates A elements that contain the given link text
*/
public By partialLinkText(final String linkText) {
return By.partialLinkText(linkText);
}
代码示例来源:origin: io.appium/java-client
@Override By getBy(Annotation annotation) {
return By
.partialLinkText(getValue(annotation, this));
}
},
代码示例来源:origin: appium/java-client
@Ignore
@Test public void whenIOSHybridAppIsLaunched() {
assertTrue(check(serverAppCapabilitiesSupplier,
appFileSupplierFunction.apply(webViewApp),
(by, aClass) -> {
new WebDriverWait(driver, 30)
.until(ExpectedConditions.presenceOfElementLocated(id("login")))
.click();
driver.findElementByAccessibilityId("webView").click();
new WebDriverWait(driver, 30)
.until(ExpectedConditions
.presenceOfElementLocated(AccessibilityId("Webview")));
try {
Thread.sleep(10000);
} catch (InterruptedException e) {
e.printStackTrace();
}
driver.getContextHandles().forEach((handle) -> {
if (handle.contains("WEBVIEW")) {
driver.context(handle);
}
});
return commonPredicate.test(by, aClass);
}, partialLinkText("login"), IOSElement.class));
}
代码示例来源:origin: com.atlassian.jira/atlassian-jira-pageobjects
@Override
public By apply(@Nullable String from)
{
return By.partialLinkText(from);
}
}
代码示例来源:origin: com.github.becauseQA/becauseQA-utils
/**
* @Title: findElementWithpartialLinkText @Description: TODO @author
* ahu@greendotcorp.com @param @param params1 @param @return @return
* WebElement return type @throws
*/
public WebElement findElementWithpartialLinkText(String params1) {
// throw new PendingException();
WebElement findElements = driver.findElement(By.partialLinkText(params1));
return findElements;
}
代码示例来源:origin: com.atlassian.selenium/atlassian-webdriver-core
/**
* @param linkText The text to match against
* @return a By which locates A elements that contain the given link text
*/
public static By partialLinkText(final String linkText) {
return by(By.partialLinkText(linkText));
}
代码示例来源:origin: com.atlassian.jira/atlassian-jira-pageobjects
/**
* @return Add link for a permission
*/
public PageElement getAddLink()
{
return find(By.partialLinkText("Add"));
}
}
代码示例来源:origin: org.xwiki.platform/xwiki-platform-test-ui
/**
* Close the date picker.
*
* @return this date picker
* @since 10.6RC1
*/
public DatePicker close()
{
this.container.findElement(By.partialLinkText("OK")).click();
return this;
}
}
代码示例来源:origin: com.github.becausetesting/commons
/**
* @Title: findElementWithpartialLinkText @Description: TODO @author
* ahu@greendotcorp.com @param @param params1 @param @return @return
* WebElement return type @throws
*/
public WebElement findElementWithpartialLinkText(String params1) {
// throw new PendingException();
WebElement findElements = driver.findElement(By.partialLinkText(params1));
return findElements;
}
代码示例来源:origin: com.atlassian.jira/atlassian-jira-pageobjects
public List<String> getPermissionsDeleteLinkIdsByPermission(final String permission)
{
List<PageElement> deleteLinks = getPermissionsRowByPermission(permission).findAll(By.partialLinkText("Delete"));
return copyOf(
Iterables.transform(deleteLinks, new Function<PageElement, String>()
{
@Override
public String apply(PageElement link)
{
return link.getAttribute("id");
}
}));
}
代码示例来源:origin: jenkinsci/acceptance-test-harness
/**
* Returns true if this Portlet contains a job with the given name.
*
* @param jobName Name of the job to look for.
* @return True, if this Portlet contains a job with the given name.
*/
public boolean hasJob(String jobName) {
try {
return !getTable().findElements(By.partialLinkText(jobName)).isEmpty();
} catch (NoSuchElementException e) {
return false;
}
}
代码示例来源:origin: com.atlassian.confluence/confluence-webdriver-pageobjects
/**
* Clicks on a result in the recently viewed panel by link text
*
* @since 5.8.0
*/
public void clickRecentlyViewedResult(String linkText) {
recentlyViewedResults.find(By.partialLinkText(linkText)).click();
}
代码示例来源:origin: com.atlassian.jira/atlassian-jira-pageobjects
public TrustedAppRow(final PageElement element)
{
this.appName = element.find(By.tagName("td")).getText().trim();
this.editLink = element.find(By.partialLinkText("Edit"));
}
代码示例来源:origin: com.atlassian.applinks/applinks-pageobjects
private void doAddLink(String regEx) {
addLink.click();
elementFinder.find(By.partialLinkText(regEx)).click();
}
代码示例来源:origin: com.atlassian.confluence/confluence-webdriver-pageobjects
public <T> T clickOnSuggestedItem(String name, Class<T> nextPage) {
suggestionsList.find(By.partialLinkText(name)).click();
return pageBinder.bind(nextPage);
}
代码示例来源:origin: net.sf.testium/testium-selenium-support
public WebElement findElementByPartialLinkText(String paramString) {
WebElement element = this.getElement();
WebElement foundElement = null;
if ( element instanceof FindsByLinkText ) {
foundElement = ((FindsByLinkText) element).findElementByPartialLinkText(paramString);
}
return new SimplePageElement( By.partialLinkText(paramString), this.getInterface(), foundElement, this );
}
代码示例来源:origin: com.atlassian.confluence/confluence-webdriver-pageobjects
public void selectUserByPartialText(String userName) {
final PageElement element = pageElementFinder.find(By.partialLinkText(userName));
waitUntilTrue(element.timed().isVisible());
element.click();
}
内容来源于网络,如有侵权,请联系作者删除!