Styrow.dev
Question 57 of 64

What is Page Object Model in Selenium?

Question

What is Page Object Model in Selenium?

Answer

Page Object Model (POM) is a design pattern, popularly used in test automation that creates Object Repository for web UI elements. The advantage of the model is that it reduces code duplication and improves test maintenance.

A page object is an object-oriented class that serves as an interface to a page of your Application Under Test(AUT)

The benefit is that if the UI changes for the page, the tests themselves don’t need to change, only the code within the page object needs to change. Subsequently, all changes to support that new UI is located in one place.