Using ExpectedConditions.visibilityOf(WebElement)
should do the trick.
How to use explicit waits when page factories are used in webdriver code
-
31-05-2022 - |
Frage
I use page factories in my webdriver code, If i want to use "ExpectedConditions.visibilityOfElementLocated"
which take a By object, how is it possible to use the WebElements declared using Page Factories. Should i simply use the locator exg(By.id("xyz")
)... But that amounts to duplicating the locators. I understand this issue has been raised in many forums. I want to know whether there is an elegant solution for this problem.
Lösung
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow