[go: up one dir, main page]

0% found this document useful (0 votes)
18 views4 pages

POM vs. Qa_Navigators Explained

Uploaded by

Sahana MP
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views4 pages

POM vs. Qa_Navigators Explained

Uploaded by

Sahana MP
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Selenium

Difference between
POM(Page Object Model)
and Page Factory.

Qa_Navigators
Selenium
POM (Page Object Model)
Structure: POM is a design pattern that creates an object repository for
web elements. Each web page is represented as a class, and each class
contains methods to interact with the web elements on that page.

Elements: In POM, you define web elements using By locators, and you
have to initialize them using driver.findElement() or
driver.findElements().

Qa_Navigators
Selenium
Page Factory

Structure: Page Factory is an implementation of POM. It provides a


more concise way to initialize web elements.

Elements: In Page Factory, you use annotations like @FindBy to define


web elements, and Page Factory initializes them for you using
PageFactory.initElements().

Qa_Navigators
TestNG
Page Factory
Example:

Qa_Navigators

You might also like