What is Page Factory?
Question
What is Page Factory?
Answer
Page Factory is an inbuilt Page Object Model concept for Selenium WebDriver.
Here as well, we follow the concept of separation of Page Object Repository and Test Methods. Additionally, with the help of PageFactory class, we use annotations @FindBy to find WebElement. We use initElements method to initialize web elements
@FindBy can accept tagName, partialLinkText, name, linkText, id, css, className, xpath as attributes.
š² Practice Offline on Mobile: Download the free QA Automation & SDET Prep app on Google Play & App Store.