O'Reilly logo

Selenium WebDriver Practical Guide by Satya Avasarala

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Good practices for the PageObjects design

So, now that you have seen what a simple implementation of PageObject looks like, it's time to consider some good practices in designing PageObjects for your test framework.

Consider a web page as a services provider

At a high level, when you look at a page in a web application, it is nothing but an aggregation of various User Services in one place. For example, if you take a look at the All Posts page in our WordPress Admin console, there are many sections in it, as shown in the following screenshot:

Consider a web page as a services provider

In the preceding All Posts page, a user can perform the following five different activities:

  • Add a New post. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required