Page Object Model is universally applicable in web test automation
Using Page Object Model wisely to enhance automated test maintenance
Table of Contents:· What is Page Object Model?
· Test Scripts: similar among all versions
· Page Classes: similar too
· How did I create with multiple versions of test scripts quickly?
· If one works well, why bother another language?
· Q & A
What is Page Object Model?
Page Object Model, also known as Page Object Pattern, is a well-known test design pattern in test automation, in fact, it is listed as one of the best practices on the Selenium website. The POM concept existed at least 30 years ago. One test manager (I still remember from Canberra) told me that he was happy to see my tool TestWise with built-in support for POM, which he had used this pattern in the 1980s.
The purpose of POM is “enhancing test maintenance and reducing code duplication” (quoted from the Selenium website). I believe many experienced test automation engineers have heard of it. I covered POM in my book: Practical Web Test Automation, and also in this article: Maintainable Automated Test Design. Read them or other resources on the Internet if you are not clear with POM.
I will continue to show how I used it in that POC.