Posts

Showing posts with the label POM

Page Object Model, what is it ?

Image
Page Object Model (POM)   is a Design Pattern that has become popular in test automation for enhancing test maintenance and reducing code duplication. Benefits of using page object pattern : Creating a reusable code that can be shared across multiple test cases. Reducing the amount of duplicated code Duplicate browser action. Duplicate page action. Duplicate element action. If the user interfaces changes, the fix needs changes in only one place. Starting a UI Automation in Selenium WebDriver is NOT a tough task. We just need to: Find elements Perform operations on it Verify the result Example of a simple test ( without implementation of POM) As you can see... all we are doing here is finding elements and filling values for those elements. This is a small script, script maintenance looks easy now, but with time, the test suite will grow and we'll add more and more lines to your code... and things become tough. The main problem with script maintenance is if 10 different scripts ar...