Here, we are using a WordPress blog: http://demo-blog.seleniumacademy.com/wp/. Let's create three test cases for it before we start talking about the PageObject pattern.
Creating test cases for our WordPress blog
Test case 1 – adding a new post to our WordPress blog
The following test script will log into the Admin portal of our WordPress blog and add a new blog post:
@Test
public void testAddNewPost() {
WebElement email = driver.findElement(By.id("user_login"));
WebElement pwd = driver.findElement(By.id("user_pass"));
WebElement submit = driver.findElement(By.id("wp-submit"));
email.sendKeys("admin");
pwd.sendKeys("$$SUU3$$N#");
submit.click(...