Login

Page Object Model (POM) Framework for Webdriver

- By Sri harsha

What is POM ?

Page Object Model is one of the design pattern which is used in test automation and has become most popular because of avoiding the duplication of code, supporting change of requirements and helps in maintenance of test framework. The Page objects that are created for each pages in the tests acts as an interface to the respective pages present in the Application under test.

These page objects uses the respective methods written for each pages and interact with the UI to perform the actions. One of the best advantage of this framework is even though the UI in the AUT changes for any pages, the tests need not be changed, only the methods present in the respective page objects has to be modified. This reduces the maintenance of the framework when any change in requirements or UI happens.

Why POM is required ?

Page object model is most popular automation frameworks because of the below reasons:

– POM provides a capability of managing the locators in such a way that if any changes to the UI is done, it is very easy to update or maintain the framework.

– POM framework is easily readable to any QA Engineer that it is self explanatory on how the framework is structured.

– It is very easy to locate any methods related to any functionality or modules because all these methods are designed and structured on Page object basis. Number of pages is equal to number of page objects.

Benefits of POM:

– POM is a comprehensive framework which is more easily readable and understandable framework. This user friendly nature has made POM popular among other frameworks in the automation world.

– POM helps us to keep the code clean and reduces the duplication of code.

– POM helps us to create compact test cases as the entire logic of validating the modules and locating the elements lies within the Page objects.

POM Architecture:

POM Project Structure:

POM Project Structure

2 responses on "Page Object Model (POM) Framework for Webdriver"

  1. Very nice post

Leave a Message

Your email address will not be published. Required fields are marked *

© JSJR Solutions Private Limited 2022 All rights reserved.
WhatsApp us whatsapp