In my Java WebDriver test I use method findElements()
to check if an element is present on the page.
I use the Page Object Pattern, so the element I want to check is declared in SomePage.class. In my test I would like to just refer to declared element, but method findElements(
) requires me to use By type and look for the element again.
Is there any way to declare WebElement once and then refer to it in findElements() method?