标准WebElement行为
标准的WebElement延迟加载工作如下:
// 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
当第一次使用时,以下内容是立即加载还是延迟加载?
@FindBy(id = "button")
private CustomButton button; // Extends TypifiedElement
@FindBy(id = "block")
private CustomComponent block; // Extends HtmlElements发布于 2016-06-01 09:44:57
它的工作方式与标准WebElements相同--当您尝试访问元素时,将首次执行对元素的搜索。
https://stackoverflow.com/questions/37535396
复制相似问题