Page Object Model (POM)
Jump to navigation
Jump to search
A Page Object Model (POM) is a design pattern for test automation.
- Context:
- It can represent page object is an object-oriented class that serves as an interface to a page of your AUT.
- It can enhance Test Maintenance and Reducing Code Duplication.
- …
- See: Bazel Automation Framework.
References
2021
- https://medium.com/tech-tajawal/page-object-model-pom-design-pattern-f9588630800b
- QUOTE: ... Page Object Model is a design pattern which 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 tests then use the methods of this page object class whenever they need to interact with the UI of that page, the benefit is that if the UI changes for the page, the tests themselves don’t need to be changed, only the code within the page object needs to change.
Subsequently all changes to support that new UI are located in one place.
- Why we need POM?
Increasing automation test coverage can result in unmaintainable project structure, if locators are not managed in right way. This can happen due to duplication of code or mainly due to duplicated usage of locators.
For Example, in home page of web application we have menu bar which leads to different modules with different features.
- QUOTE: ... Page Object Model is a design pattern which 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 tests then use the methods of this page object class whenever they need to interact with the UI of that page, the benefit is that if the UI changes for the page, the tests themselves don’t need to be changed, only the code within the page object needs to change.
2019
- https://maven.apache.org/pom.html#What_is_the_POM
- QUOTE: ... POM stands for “Project Object Model”. It is an XML representation of a Maven project held in a file named pom.xml.
2018
- https://qr.ae/pvintV
- QUOTE: ...
- … Project Object Model: It is the fundamental unit for Maven Related Projects.Its basically a xml file which contains the project structure, dependencies, configuration details required to build the project. ...
- … Page Object Model: It's a design pattern required to create Object Repository for UI Elements. As per this model,for each Page there has to be a Page class. This page class will have Web Elements of the Web Page along with the methods that perform operations on these web elements. ...
- QUOTE: ...