The AllPostsPage PageObject deals with the All Posts page, using the following code:
public class AllPostsPage { WebDriver driver; @FindBy(id = "the-list") WebElement postsContainer; @FindBy(id = "post-search-input") WebElement searchPosts; @FindBy(id = "cat") WebElement viewByCategories; @FindBy(linkText = "Add New") WebElement addNewPost; public AllPostsPage(WebDriver driver) { this.driver = driver; driver.get("http://demo-blog.seleniumacademy.com/wp/wp-admin/edit.php"); } public void createANewPost(String title, String description) { addNewPost.click(); AddNewPostPage newPost = PageFactory.initElements(driver, AddNewPostPage.class); newPost.addNewPost(title, description); } public void editAPost(String presentTitle ...