Designing and building subclasses for feature-specific pages using inheritance techniques

After building the abstract base class for the AUT in the framework, subclasses need to be developed for each feature page. In following the Selenium Page Object Model, users should build a separate page object class for each page in the browser or mobile app.

As the subclasses are built, whenever common components are found that pertain to most pages, they can be added to the base class. Alternatively, if only on select pages, a separate page object class can be developed for a partial page. The base class can then be extended for those pages that need to inherit the components in it. A good example would be the table component, which we will cover ...

Get Selenium Framework Design in Data-Driven Testing now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.