Designing Page Object Model
POM (Page Object Model) is a design pattern that is used in selenium test automation for organizing the helper code for maintainability and reducing code duplication. A page object or a page class is basically a representation of all or some of the actions and operations which can be performed on that page of your application and also acts as an interface to a page of your application under test.
The main advantage of POM is to reduce the maintenance when the locator changes or new functionality is being added to a page. Typically, a test flow will use the page object methods to perform an operation that internally will use locators to operate on that WebElement. The Page Object Model pattern makes the test automation framework easy to use, reliable and robust. The test flow looks clean and short since we reuse the page object methods.