I am a new test engineer and have been reading about Page Object Model and implementing them and keep coming across Page Factory. I understand that Page Factory is a POM that provides additional features such as instantiating all elements when calling Page Factory and more readable code for tests (though I'm not completely sold on the readability). To be clear, I'm sold on POM. The reusability of the code and the relative ease of maintenance are great and I'm building in that direction.
The two questions I have come down to:
- Why do I want to instantiate all the elements instead of doing it on the fly?
- What are the advantages of Page Factory that I'm missing?
Aucun commentaire:
Enregistrer un commentaire