Hot answers tagged

5

Page Factory Pattern is like an extension to Page Object Model , but Page Factory is much enhanced model. To start with, we just need to import package org.openqa.selenium.support.PageFactory "Factory class can be used to make using Page Objects simpler and easier". We use Page Factory pattern to initialize web elements which are defined in Page Objects. ...


3

Page Factory Pattern is like an extension to Page Object Model , but Page Factory is much enhanced model. To start with, we just need to import package org.openqa.selenium.support.PageFactory "Factory class can be used to make using Page Objects simpler and easier". We use Page Factory pattern to initialize web elements which are defined in Page Objects. ...


1

The driver field in LoginTC hides the driver field from BasePage. The BasePage class fills in its own driver field, but LoginTC uses its own, which is never initialized. Solution: Remove the driver field from LoginTC, then either: Make the driver field in BasePage public or protected. Add a "getter" method (driver() or getDriver() or similar) to BasePage ...


1

On the Scorex_LoginTestCases (Btw, we do not use underscore in names in Java (See conventions), the objects objLogin and objHome are not initialized. On the TestBase, you should initialize them using the PageFactory's method initElements. You can see a sample here.



Only top voted, non community-wiki answers of a minimum length are eligible