Page Object Model
Page Object Model Framework is gaining popularity in the industry because of its easy test maintenance and reduces the duplication of code.
The main advantage of Page Object Model is that if the UI changes for any page, it doesn’t require us to change any tests, we just need to change only the code within the page objects (Only at one place). Many other tools which are using selenium, are following the page object model.Page Object model is writing all the functionalities / reusable components of a test page that we want to automate in a separate class.
The Page Object model provides the following advantages.
1. There is a clean separation between test code and page specific code such as locators (or their use if you’re using a UI map) and layout.
2. There is a single repository for the services or operations offered by the page rather than having these services scattered through out the tests.