InterviewSolution
| 1. |
What is Page Object Model or POM? |
|
Answer» POM that is Page Object Model is a design pattern popular in selenium to create object repository for web UI elements. It is a widely used design pattern for enhancing test maintenance and to avoid code duplication. It can be used in a type of framework such as MODULAR, data-driven, keyword-driven, ETC. POM is an object-oriented class works as an interface to the page for application under test. Under the page object model, for each web page in the application, there must be a corresponding page class. Web element of that web page will be identified by page class and this page class also contains Page methods which perform operations on those WebElements. As per the TASK performed by these methods, the name of these methods is given. POM allows Operations. POM concept makes the test scripts cleaner and EASY to understand. With the help of POM, the object repository is created independent of test cases, so you can use the same object repository for a different purpose with different tools. We can integrate POM with TestNG/JUnit for functional testing and as well as with JBehave/Cucumber for ACCEPTANCE testing. |
|