I'm working on a use case where I need to identify one or more WebElement objects in QAF (Qmetry Automation Framework). In Selenium, I can achieve this by using the @FindAll annotation with multiple @FindBy annotations, like this:
@FindAll({
@FindBy(className = "class1"),
@FindBy(className = "class2")
})
private List<WebElement> elementsWithEitherClass1OrClass2;
However, I couldn't find a similar implementation in QAF. Is there a way to achieve the same result in QAF? I would appreciate any guidance or suggestions on how to approach this in QAF. Thank you!
QAF supports
FindBy(org.openqa.selenium.support.FindBy),FindBys(org.openqa.selenium.support.FindBys) from selenium support library in addition to it's ownFindBy(com.qmetry.qaf.automation.ui.annotations.FindBy) but notFindAllIt doesn't mean you can not use it with QAF. To use
FindAllyou will required to add additional one line code as below in your page class constructor.