Think of a web page as a services provider

At a high level, when you look at a page in a web application, you will find it is an aggregation of various User Services. For example, if you take a look at the All Posts page in our WordPress Admin console, there are many sections in it:

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

  • Add a new post.
  • Edit a selected post.
  • Delete a selected post.
  • Filter the posts by category.
  • Search for text in all the posts.

The preceding activities are the services that the All Posts page provides to its users. So, your PageObject should also provide these ...

Get Selenium WebDriver 3 Practical Guide - Second Edition 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.