本文整理了Java中org.openqa.selenium.support.pagefactory.Annotations.buildByFromFindBy()
方法的一些代码示例,展示了Annotations.buildByFromFindBy()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Annotations.buildByFromFindBy()
方法的具体详情如下:
包路径:org.openqa.selenium.support.pagefactory.Annotations
类名称:Annotations
方法名:buildByFromFindBy
暂无
代码示例来源:origin: org.seleniumhq.webdriver/webdriver-support
public By buildBy() {
assertValidAnnotations();
By ans = null;
FindBys findBys = field.getAnnotation(FindBys.class);
if (ans == null && findBys != null) {
ans = buildByFromFindBys(findBys);
}
FindBy findBy = field.getAnnotation(FindBy.class);
if (ans == null && findBy != null) {
ans = buildByFromFindBy(findBy);
}
if (ans == null) {
ans = buildByFromDefault();
}
if (ans == null) {
throw new IllegalArgumentException("Cannot determine how to locate element " + field);
}
return ans;
}
代码示例来源:origin: org.seleniumhq.webdriver/webdriver-support
protected By buildByFromFindBys(FindBys findBys) {
assertValidFindBys(findBys);
FindBy[] findByArray = findBys.value();
By[] byArray = new By[findByArray.length];
for (int i = 0; i < findByArray.length; i++) {
byArray[i] = buildByFromFindBy(findByArray[i]);
}
return new ByChained(byArray);
}
代码示例来源:origin: net.thucydides/thucydides-core
public org.openqa.selenium.By buildBy() {
assertValidAnnotations();
org.openqa.selenium.By ans = null;
//default implementation in case if org.openqa.selenium.support.FindBy was used
org.openqa.selenium.support.FindBy findBy = field.getAnnotation(org.openqa.selenium.support.FindBy.class);
if (ans == null && findBy != null) {
ans = super.buildByFromFindBy(findBy);
}
//my additions to FindBy
FindBy myFindBy = field.getAnnotation(FindBy.class);
if (ans == null && myFindBy != null) {
ans = buildByFromFindBy(myFindBy);
}
FindBys findBys = field.getAnnotation(FindBys.class);
if (ans == null && findBys != null) {
ans = buildByFromFindBys(findBys);
}
if (ans == null) {
ans = buildByFromDefault();
}
if (ans == null) {
throw new IllegalArgumentException("Cannot determine how to locate element " + field);
}
return ans;
}
代码示例来源:origin: net.serenity-bdd/core
public org.openqa.selenium.By buildBy() {
assertValidAnnotations();
org.openqa.selenium.By ans = null;
//default implementation in case if org.openqa.selenium.support.FindBy was used
org.openqa.selenium.support.FindBy findBy = field.getAnnotation(org.openqa.selenium.support.FindBy.class);
if (ans == null && findBy != null) {
ans = super.buildByFromFindBy(findBy);
}
//my additions to FindBy
FindBy myFindBy = field.getAnnotation(FindBy.class);
if (ans == null && myFindBy != null) {
ans = buildByFromFindBy(myFindBy);
}
FindBys findBys = field.getAnnotation(FindBys.class);
if (ans == null && findBys != null) {
ans = buildByFromFindBys(findBys);
}
if (ans == null) {
ans = buildByFromDefault();
}
if (ans == null) {
throw new IllegalArgumentException("Cannot determine how to locate element " + field);
}
return ans;
}
代码示例来源:origin: net.serenity-bdd/core
by = super.buildByFromFindBy(seleniumBy);
内容来源于网络,如有侵权,请联系作者删除!