Join 500+ Software Testing professionals. Solve problem and get your problem solved. Register Now!

Which is better POM (Page Object Model) or PageFactory?

Open 1 Answers 85 Views
0 1
Which is better POM (Page Object Model) or PageFactory? What is the difference between this two and which one do you suggest to use?

1 Answer


Page object is a class that represent a web page and holds the functionality

 A  Page Object Model is a way of representing an application in a test framework. For every ‘page’ in the application, you create a Page Object to reference the ‘page’.

Page factory is a way to initialize the web elements you want to interact with within the page object when you create an instance of it

 A Page Factory is one way of implementing a Page Object Model. In order to support the Page Object pattern, WebDriver’s support library contains a factory class.

answered by

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.