Page Object Model (POM)

Page Object Model is an element design pattern to create repositories for web elements.

Under this model we create classes for every page of the web application, these page classes contains web elements that behaves as object repository and also contains Page methods which perform operations on those web elements.
Name of these methods should be given as per the task they are performing, i.e. if we want get the user name from home page, then POM method name can be getHomePageDashboardUserName()

Advantages of POM

  • Easy to maintain
  • Easy readability of scripts
  • Reduce or eliminate duplicates
  • Re-usability of codes
  • Reliability

We can create Page Object Model in two ways –

  1. POM without Page Factory
  2. POM with Page Factory

@CacheLookUp in Page Object

Next

Leave a comment

Design a site like this with WordPress.com
Get started