Package com.version1.pageobjects
Class BasePageObject
java.lang.Object
com.version1.pageobjects.BasePageObject
This class is a base that all page objects can inherit from. It ensures that we have
a WebDriver object at the very least, and also takes care of initiating all of the annotated (@FindBy)
WebElements that are declared in page objects as fields.
The constructor of this class is called in every page objects constructor that inherits from this class.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBasePageObject(org.openqa.selenium.WebDriver webDriver) Initiates page elements that are declared as fields annotated @FindBy and makes the WebDriver instance available to child classes. -
Method Summary
-
Field Details
-
webDriver
protected org.openqa.selenium.WebDriver webDriver -
wait
protected org.openqa.selenium.support.ui.WebDriverWait wait
-
-
Constructor Details
-
BasePageObject
protected BasePageObject(org.openqa.selenium.WebDriver webDriver) Initiates page elements that are declared as fields annotated @FindBy and makes the WebDriver instance available to child classes.- Parameters:
webDriver- active WebDriver instance
-