https://www.gcreddy.com/2021/01/page-object-model-in-selenium-3.html
Page Object Model in Selenium, Create Object Repositories in Selenium, Advantages of Page Object Model, and reuse elements in Selenium Test Cases.

Page Object is a Design Pattern that has become popular in test automation for enhancing test maintenance and reducing code duplication.

A page object is an object-oriented class that serves as an interface to a page of your AUT.

The test cases then use the methods of this page object class whenever they need to interact with the UI of that page.

Page Object Model is an Object/Element design pattern to create Object Repositories

We create object repositories for reusing objects/elements and centralized maintenance of elements/objects

Under this POM, container classes for web elements are created that behave as Object Repositories.

We can create POM in two ways
1. POM without Page Factory
2. POM with Page Factory

Under this POM, for each web page there should be a corresponding page class, this page class finds the web elements of the web page and also contains customized commands which perform actions on web elements.

Implementing Page Object Model

In this approach, all pages of the application and user actions on web elements are maintained as methods, by importing the page class we can create test cases