Java 类org.openqa.selenium.support.pagefactory.ByChained 实例源码
项目:menggeqa
文件:AppiumByBuilder.java
protected static By createBy(Annotation[] annotations, HowToUseSelectors howToUseLocators) {
if (annotations == null || annotations.length == 0) {
return null;
}
switch (howToUseLocators) {
case USE_ONE: {
return getMobileBy(annotations[0], getFilledValue(annotations[0]));
}
case BUILD_CHAINED: {
return getComplexMobileBy(annotations, ByChained.class);
}
case USE_ANY: {
return getComplexMobileBy(annotations, ByAll.class);
}
default: {
return null;
}
}
}
项目:jpagefactory
文件:JPageFactoryAnnotations.java
protected By buildByFromFindBys(FindBys findBys) {
FindBy[] findByArray = findBys.value();
By[] byArray = new By[findByArray.length];
for (int i = 0; i < findByArray.length; ++i) {
byArray[i] = this.buildByFromFindBy(findByArray[i]);
}
return new ByChained(byArray);
}
项目:gwt-d3
文件:TestSuiteScreen.java
public List<WebElement> getTestCaseWidgets() {
ByChained chained = new ByChained(By.id(TestSessionContainer.ID), By.className(Constants.BTN));
WebDriverWait wait = new WebDriverWait(driver, 3);
wait.until(ExpectedConditions.visibilityOfElementLocated(chained));
List<WebElement> elements = driver.findElements(chained);
return elements;
}
项目:opensearchserver
文件:WebDriverHtmlNode.java
private List<WebElement> getChainedWebElements(String... path) {
By.ByTagName[] byTagNames = getByTagNameArray(path);
if (byTagNames == null)
return null;
return node.findElements(new ByChained(byTagNames));
}