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.
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 services for the test case, which is the user of this PageObject. The code for the All Posts
PageObject should look as follows:
public class AllPostsPage...