I'm starting my career as a QA Automation Engineer coming from a Jr dev background. I noticed that there are two main design patterns for Selenium, POM and PageFactory.
- Which is the preferred design pattern to use in best practice?
- Also, there are several ways of finding an HTML element. Which one tends to be the best practice rule of finding an element? Is it ID?
As for Page Factory, my understanding is that for each webpage, you create a class representation of said webpage, and within the class, you create methods that act upon the webelements. You then will have different test classes that do the actual testing. Please correct or confirm my understanding.