Now that we have understood what PageObjects are, it is time to take a look at an end-to-end example that interacts and tests the WordPress Admin console. First, we will see all the PageObjects and then the test cases that use them.
Let us first see all the PageObjects that are involved in testing the WordPress Admin console.
AdminLoginPage PageObject deals with the login page. This object has to be refactored if any changes have been made to the page in the target application, using the following code:
package com.packt.webdriver.chapter9.pageObjects; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.CacheLookup; ...