What is difference between Page object model and page factory?

What is difference between Page object model and page factory?

Page Object is a class that defines a web page and contains its functionality and members. In contrast, Page Factory is a method for instantiating the web elements you wish to interact with within the page object when you make an instance of it.

Differences between Page Object and Page Factory is shown below -

Page Object Model

  1. It is a technique for design patterns.
  2. Not recommened to process tasks
  3. It aids in the separation of page objects and scripts.
  4. It use ‘By’ annotation to specify page objects.

Page Factory

  1. Page Factory is an inbuilt-POM or class offered by Selenium Webdriver
  2. Recommended method to process tasks.
  3. It is a method used to implement POMs.
  4. It specify page objects using FindBy annotation.

Read more to know about thier differences.