首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >延迟加载是如何与Yandex HtmlElements工作的?

延迟加载是如何与Yandex HtmlElements工作的?
EN

Stack Overflow用户
提问于 2016-05-31 01:08:33
回答 1查看 201关注 0票数 1

标准WebElement行为

标准的WebElement延迟加载工作如下:

代码语言:javascript
复制
// Will not try to find button until perform an operation on it such as button.click();
@FindBy(id = "button")
private WebElement button;

// Button list will be created immediately
@FindBy(id = "button")
private List<WebElement> buttons;

// Button list will be created after waiting 5 seconds
@Timeout(5)
@FindBy(id = "button")
private List<WebElement> buttons;

Yandex HtmlElements/TypifiedElement

当第一次使用时,以下内容是立即加载还是延迟加载?

代码语言:javascript
复制
@FindBy(id = "button")
private CustomButton button;        // Extends TypifiedElement

@FindBy(id = "block")
private CustomComponent block;      // Extends HtmlElements
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-06-01 09:44:57

它的工作方式与标准WebElements相同--当您尝试访问元素时,将首次执行对元素的搜索。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/37535396

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档