Chapter 9. Understanding PageObject Pattern
Until now, we have seen various APIs of WebDriver and learned how to use them to accomplish various actions on the web application we're testing. We created many test scripts that use these APIs and are executed on a daily or weekly basis. One big challenge that you have to deal with, regarding these test scripts, is maintainability. In this chapter, we will cover the following topics:
- What is the PageObject pattern design?
- Good practices for designing PageObjects
- Extensions to the PageObject pattern
- An end-to-end example
A decently written test script would work just fine as long as the target web application doesn't change. But once one or more pages in your web application change, you as a test script ...