What is POM in Selenium
Click to rate this post!
[Total: 0 Average: 0]

Page Object Model is used for Designing the Pattern. Which is used for reducing Code Duplication and to increase test  maintenance. A page is know as object oriented class. That which is the base to Interface of the page of your AUT. Afterwards all modifications to help that updated UI are situated in one point. In the first place it explains What is POM in SeleniumWhat is POM in Selenium

What is the Need of POM:-

If we Do more Automation in test Coverage. It shows output in un-maintainable project Design. If the locators are not maintained in a correct way. This happens when code is Duplicated and seriously when we use duplicate usage of locators. As a matter of fact it is showing that What is POM in Selenium online training Hyderabad

What is POM in Selenium Example :-

For Instance, in a home page, if we consider a web application, menu option is there which leads to different set of features and modules. And more automation can be clicked by this menu buttons. To get output of Specific Tests. If you think that UI is Modified  and menu buttons are changed to Different positions in a home page. This output Automation tests to fails. Automated tests cases will change and fail as scripts. This scripts will not rectify element locators for performing the Tasks.

After that a QA Engineer will check  the whole code step by step for updating locators where they are needed.  If we update element locators in a duplicated code, it will consume a lot of time for arranging the locators. In the mean while this time by using Page Object Model in our test and Automation Framework. In the same fashion it showing the example of What is POM in Selenium.

Benefits of Page Object Model :-

1)If we take Page Object Model, we should keep separately elements and tests. This will makes the code easy to understand and maintain.

2)This can make friendly relations for automation Framework Programmer. It would be more Comprehensive and Durable.

3) other Benefit is Page Object Repository is Independent of Automation tests. By keeping this as separate, it helps in using this repository for so many purposes with types of frameworks like. We can integrate repository with another tools. Like cucumber/TESTING etc.

4)These Test cases made simple and when we reuse page object methods in POM class.

5) Modification of UI can be used and updated in  page class.

Implementation of POM:-

POM is good for applications, which has so many pages. It contains Fields. Which is equal to Referred with page.

  1. Start new Directory/folder/package in project. It depends on which IDE you are using. Name it as page objects. You can implement it by right click. On the project root level and select NEW>Directory. In some cases automation framework implemented by PHP storm with Co-deception. It has page object Model Inside _Support folder.
  2. You can Implement it at the core level of project and we can see it in your project, you have an option of sub folders inside page objects. To keep more categories in it and neat
  3. click right option on the folder,add new class file ,name it to actual page from test object i.e., Page-objects->login->loginHome.php
  4. so now you can Implement method for elements in login home page, each method has a return value element .
  5. After that start test case for login by right click on Tests folder in project Directory : Add new session and mark it as Logincest.php
  6. By Implementing Page object Model, element locators handled in another Directory, updated by not changing test cases.
  7. Starting selenium test cases can output in an un managed Project. In some reasons is that, more usage of duplicate code. By using duplicate locators It happens. If we use duplicated code it is less maintainable. Correspondingly all the above will explain What is POM in Selenium.
Recommended Audience :

Software developers

System Admins

Project  Managers

Team Leaders


There is Nothing required for taking Selenium online course Bangalore. rather than It is better to have analytical knowledge. Good to know programming languages like Java, C#,  PERL and one database like MySQL. But not Mandatory. finally In OnlineITGuru Trainers will teach you from the basics. furthermore They will teach in a practical way by performing in selenium tool.

Drop Us A Query

100% Secure Payments. All major credit & debit cards accepted.

Call Now Button