I have an automation framework that is driven using page object model using page factory
@FindBy(xpath = "xpathValue")
private WebElement notificationIcon;
I want to have an reusable utility to find all the Webelements. For that I traditionally use findElements methods which takes By parameter. How can I achieve the same using page factory?
I know that I can use the below approach, but I do not want to write for all webelements like this.
@FindBy(xpath = "xpathValue")
private List<WebElement> notificationIcon;
Hence, please find me a solution for this to find all the WebElements using a WebElement type parameter?