Browser page object base and subclasses
The following code is for the PassionTeaCoBasePO.java
and PassionTeaCoWelcomePO.java
classes:
PassionTeaCoBasePO.java
The following code is for the PassionTeaCoBasePO.java
class:
import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; import org.openqa.selenium.support.PageFactory; import static org.testng.Assert.assertEquals; /** * @author Carl Cocchiaro * * Passion Tea Company Base Page Object Class * */ public abstract class PassionTeaCoBasePO<M extends WebElement> { // local variables protected String pageTitle = ""; // constructor public PassionTeaCoBasePO() throws Exception { PageFactory.initElements(CreateDriver.getInstance(). getDriver(),this); } // elements @FindBy(css = "img[src*='01e56eb76d18b60c5fb3dcf451c080a1']") protected M passionTeaCoImg; @FindBy(css = "img[src*='ab7db4b80e0c0644f5f9226f2970739b...