Styrow.dev
Question 58 of 82

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.