Further reading on Page Objects available below:
Within your web app's UI there are areas that your tests interact with. A Page Object simply models these as objects within the test code. This reduces the amount of duplicated code and means that if the UI changes, the fix need only be applied in one place.
Taking it back to basics, essentially there are three functions I see a page object pattern provides:
- Ability to easily instantiate pages in a consistent manner;
- Ability to concisely describe elements on a page, keep it DRY by avoiding repetition of element identifiers (using the underlying
driver’s API); and
- Ability to provide higher level methods that use the elements to perform user oriented functions.