Selenium series: Reusing POM classes
Blog post from Octopus Deploy
In this blog post, Matthew Casperson discusses enhancing a Selenium WebDriver test framework using the Page Object Model (POM) design pattern to verify ticket prices in an application. The post describes the implementation of new methods in the CheckoutPage class to support this test, including defining a regular expression to extract and convert ticket prices from strings and methods for selecting different event sections. It explains how the POM pattern facilitated the test creation by abstracting the web application's details into reusable Java objects, allowing the test to focus on verifying price ranges across various sections without being bogged down by implementation specifics. The utility of the POM design pattern is highlighted for its ability to simplify test maintenance and adaptation in response to potential application updates.