Is there any resolution on this topic?
We cannot use
@FindBy(css = ".my-class")
protected List<WebElementFacade> myListOfElements
If I now want to use any WebElementFacade from the list, I get the below class cast exception.
public void doSomething () {
System.out.println(myListOfElements.get(0)); --> throws exception
}
However, if I define the list inside the method it is used, works fine, i.e.
public void doSomething () {
List<WebElementFacade> myListOfElements = findAll(By.cssSelector(".my-class"));
System.out.println(myListOfElements.get(0)); --> works fine