Tips for Healthy Page Object Classes

The most popular design pattern used in web UI test codebases is the Page Object Model (POM) design pattern. These tips should help you design healthy classes that implement the Page Object Model design pattern. The use of this pattern promotes separation of concerns (e.g. tests vs managing state), reduces code duplication, and provides reusable methods.

By |2021-01-18T08:59:52-06:00February 3, 2020|Automation|20 Comments

Inheriting WebDriver Throughout Your Page Object Classes

I’ve seen (and written) several automation projects where each page class requires a constructor that takes a WebDriver object so that the page classes can access the current browser instance. There’s nothing particularly wrong with this, but I do find it a bit annoying to pass around the WebDriver like a hot potato. There’s a couple of ways to handle it and both involve inheritance.

By |2024-09-21T23:35:30-05:00December 21, 2017|Automation|15 Comments
Go to Top