本文整理汇总了Java中org.openqa.selenium.support.FindAll类的典型用法代码示例。如果您正苦于以下问题:Java FindAll类的具体用法?Java FindAll怎么用?Java FindAll使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FindAll类属于org.openqa.selenium.support包,在下文中一共展示了FindAll类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: assertValidAnnotations
import org.openqa.selenium.support.FindAll; //导入依赖的package包/类
@Override protected void assertValidAnnotations() {
AnnotatedElement annotatedElement = annotatedElementContainer.getAnnotated();
AndroidFindBy androidBy = annotatedElement.getAnnotation(AndroidFindBy.class);
AndroidFindBys androidBys = annotatedElement.getAnnotation(AndroidFindBys.class);
checkDisallowedAnnotationPairs(androidBy, androidBys);
AndroidFindAll androidFindAll = annotatedElement.getAnnotation(AndroidFindAll.class);
checkDisallowedAnnotationPairs(androidBy, androidFindAll);
checkDisallowedAnnotationPairs(androidBys, androidFindAll);
SelendroidFindBy selendroidBy = annotatedElement.getAnnotation(SelendroidFindBy.class);
SelendroidFindBys selendroidBys = annotatedElement.getAnnotation(SelendroidFindBys.class);
checkDisallowedAnnotationPairs(selendroidBy, selendroidBys);
SelendroidFindAll selendroidFindAll =
annotatedElement.getAnnotation(SelendroidFindAll.class);
checkDisallowedAnnotationPairs(selendroidBy, selendroidFindAll);
checkDisallowedAnnotationPairs(selendroidBys, selendroidFindAll);
iOSFindBy iOSBy = annotatedElement.getAnnotation(iOSFindBy.class);
iOSFindBys iOSBys = annotatedElement.getAnnotation(iOSFindBys.class);
checkDisallowedAnnotationPairs(iOSBy, iOSBys);
iOSFindAll iOSFindAll = annotatedElement.getAnnotation(iOSFindAll.class);
checkDisallowedAnnotationPairs(iOSBy, iOSFindAll);
checkDisallowedAnnotationPairs(iOSBys, iOSFindAll);
FindBy findBy = annotatedElement.getAnnotation(FindBy.class);
FindBys findBys = annotatedElement.getAnnotation(FindBys.class);
checkDisallowedAnnotationPairs(findBy, findBys);
FindAll findAll = annotatedElement.getAnnotation(FindAll.class);
checkDisallowedAnnotationPairs(findBy, findAll);
checkDisallowedAnnotationPairs(findBys, findAll);
}
开发者ID:JoeUtt,项目名称:menggeqa,代码行数:32,代码来源:DefaultElementByBuilder.java
示例2: buildDefaultBy
import org.openqa.selenium.support.FindAll; //导入依赖的package包/类
@Override protected By buildDefaultBy() {
AnnotatedElement annotatedElement = annotatedElementContainer.getAnnotated();
By defaultBy = null;
FindBy findBy = annotatedElement.getAnnotation(FindBy.class);
if (findBy != null) {
defaultBy = super.buildByFromFindBy(findBy);
}
if (defaultBy == null) {
FindBys findBys = annotatedElement.getAnnotation(FindBys.class);
if (findBys != null) {
defaultBy = super.buildByFromFindBys(findBys);
}
}
if (defaultBy == null) {
FindAll findAll = annotatedElement.getAnnotation(FindAll.class);
if (findAll != null) {
defaultBy = super.buildBysFromFindByOneOf(findAll);
}
}
return defaultBy;
}
开发者ID:JoeUtt,项目名称:menggeqa,代码行数:24,代码来源:DefaultElementByBuilder.java
示例3: configure
import org.openqa.selenium.support.FindAll; //导入依赖的package包/类
@Override
public void configure() {
final FindByKeyInjectionListener findByKeyInjectionListener = new FindByKeyInjectionListener();
bind(FindByKeyInjectionListener.class).toInstance(findByKeyInjectionListener);
bindListener(Matchers.any(), new TypeListener() {
@Override
public <I> void hear(TypeLiteral<I> type, TypeEncounter<I> encounter) {
if (hasFindByKeyAnnotation(type.getRawType())) {
encounter.register(findByKeyInjectionListener);
}
}
private boolean hasFindByKeyAnnotation(Class<?> clazz) {
while (clazz != null) {
for (Field field : clazz.getDeclaredFields()) {
if (field.isAnnotationPresent(FindByKey.class) || field.isAnnotationPresent(FindBy.class) || field
.isAnnotationPresent(FindAll.class)) {
return true;
}
}
// If this Class represents either the Object class, an interface, a primitive type, or void, then
// null is returned.
clazz = clazz.getSuperclass();
}
return false;
}
});
}
开发者ID:MagenTys,项目名称:cinnamon,代码行数:30,代码来源:WebDriverModule.java
示例4: buildBy
import org.openqa.selenium.support.FindAll; //导入依赖的package包/类
public By buildBy() {
By ans = null;
FindAll findAll = field.getAnnotation(FindAll.class);
if (findAll != null) {
ans = buildBysFromFindByOneOf(findAll);
}
FindBy findBy = field.getAnnotation(FindBy.class);
if (ans == null && findBy != null) {
ans = buildByFromFindBy(findBy);
}
FindByKey findByKey = field.getAnnotation(FindByKey.class);
if (ans == null && findByKey != null) {
ans = buildByFromFindByKey(findByKey);
}
if (ans == null) {
ans = buildByFromDefault();
}
if (ans == null) {
throw new IllegalArgumentException("Cannot determine how to locate element " + field);
}
return ans;
}
开发者ID:MagenTys,项目名称:cinnamon,代码行数:29,代码来源:Annotations.java
注:本文中的org.openqa.selenium.support.FindAll类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论