本文整理汇总了Java中ru.yandex.qatools.htmlelements.element.HtmlElement类的典型用法代码示例。如果您正苦于以下问题:Java HtmlElement类的具体用法?Java HtmlElement怎么用?Java HtmlElement使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
HtmlElement类属于ru.yandex.qatools.htmlelements.element包,在下文中一共展示了HtmlElement类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: waitForFieldToBeVisible
import ru.yandex.qatools.htmlelements.element.HtmlElement; //导入依赖的package包/类
/**
* Checks for visibility of Fields with the {@link Visible} annotation.
* Will recurse inside {@link HtmlElement}s
*
* @param pageObject the pageObject
* @param field wait for visibility of the field
* @param checkAtMost maximum number of elements to check in a List
*/
@SuppressWarnings("unchecked")
private void waitForFieldToBeVisible(Object pageObject, Field field, int checkAtMost) {
Object objectFromField = getObjectFromField(pageObject, field);
applyToWebElements(
field,
objectFromField,
we -> wait.until(visibilityOf(we)),
list -> wait.until(visibilityOfAllElements(
list.stream()
.limit(checkAtMost == -1 ? list.size() : checkAtMost)
.collect(Collectors.toList()))));
// recurse inside HtmlElements
if (isHtmlElementList(field)) {
((List<HtmlElement>) objectFromField)
.forEach(this::waitForAnnotatedElementVisibility);
} else if (isHtmlElement(field)) {
waitForAnnotatedElementVisibility(objectFromField);
}
}
开发者ID:Frameworkium,项目名称:frameworkium-core,代码行数:30,代码来源:Visibility.java
示例2: getDeclaredFieldsIncludingSuperClasses
import ru.yandex.qatools.htmlelements.element.HtmlElement; //导入依赖的package包/类
/**
* Extracts all fields from a class (page object) and its super classes.
* This then behaves as expected if a page object extends something which
* itself extends HtmlElement or BasePage.
*/
private List<Field> getDeclaredFieldsIncludingSuperClasses(Class<?> clazz) {
final List<Field> fields = new ArrayList<>();
for (Class<?> c = clazz;
((c != null) && (c != BasePage.class) && (c != HtmlElement.class));
c = c.getSuperclass()) {
fields.addAll(Arrays.asList(c.getDeclaredFields()));
}
return fields;
}
开发者ID:Frameworkium,项目名称:frameworkium-core,代码行数:16,代码来源:Visibility.java
注:本文中的ru.yandex.qatools.htmlelements.element.HtmlElement类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论