SpecFlow: 03 - Selenium POM PageObjects & PageActions
Test Definitions For Selenium POM
- While Selenium3 has done away with the attribute-driven PageFactory, the PageObject Model is still applicable
POM - Page Objects
PageBaseClass
- Create a BaseClass that will be used for the PageObject classes & their static methods
- Settings that will be common to all page objects can also reside here, though this base class can simply consume & return the 'driver'
- The PageObject clases will extend the BaseClass & provide static methods to be called from the PageActions classes
Home_Page
IWebElement = el;
public static void Login_Link(){
el = findElement(By.XPath("//a[@href='/login/']");
}
Login_Link()
Logout_Link()
Login_Page
TxtBox_Username()
TxtBox_Password()
Btn_LoginButton()