Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

0 like 0 dislike
539 views
by
retagged by
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

0 like 0 dislike
by

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.


This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!

1.4k questions

1.6k answers

866 comments

1.9k users

...