The AllPostsPage PageObject

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 ...

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.