更新时间:2021-12-08 10:25:17
您可以使用注释 @FindAll
.这是示例:
You can use the annotation @FindAll
. Here is the example:
@FindAll({
@FindBy(id = "one_id"),
@FindBy(id = "another_id")
})
WebElement myElement;
请参见 docs .
这种方法的优点是您实际上可以组合不同类型的定位器.
The advantage of this approach is that you can actually combine the locators of different types.