What is Page Factory in Selenium ?
Page Factory is a Selenium WebDriver Page Object Model (POM) that makes automation simple for QAs and developers. You can use page factory to create reusable configurations for your test data.
The PageFactory class allows you to define page objects once in an abstract way, thus making it possible to create numerous concrete page objects tailored for each view without changing the Page Object’s definition.
The Page Object Model (POM) uses the simple concept of the Page Class (Pom Class) to create a hierarchy of related objects. This hierarchy is helpful when one object builds upon another. In the Page Object Model, all interactions are routed through a command object. Page Factory in Selenium is a useful tool that can be used to improve the maintainability and re-usability of the Web application tests. It improves usability, ease of maintenance, and reusability of code functionality.
Hope it helps!
Thanks Shahzeb for the speedy reply!