SlideShare a Scribd company logo
2
Most read
4
Most read
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Agenda
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Agenda For The Session
i. Why Use Page Object Model (POM)?
ii. What Is Page Object Model?
iii. What Is Page Factory?
iv. Demo: Creating POM & Page Factory
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Why Use Page Object Model?
A Web page has ‘x’ no. of elements, which are used in multiple test cases.
Now if the path/locator of any element changes, then what happens?
PROBLEM STATEMENT
A web page with ‘x’ elements
OH MY GOD !!
Do I have to change
the element locators
in entire test script?
Test Script
SOLUTION
Test
case
Element
locator
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
What Is Page Object Model?
Page Object Model is a design pattern to create an Object Repository for web UI elements.
Here, all the element locators used by the application will be stored in a class file separately from test case.
Test
Case
Page
Class
Locators & test script stored separately
POM Design Pattern
• Element locators
• Methods performing operations on elements.
Page Class contains
• Actual test scenario
• Calls to methods in page class with arguments.
Test Case contains
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
What Is Page Factory?
POM Implementation
With
Page Factory
Without
Page Factory
• Uses By().
• No imports needed.
• No cache storage.
• Uses @FindBy().
• Import package: Page factory.
• Cache lookup is faster.
Page Factory is a built-in class in Selenium for maintaining object repository. (Import package: Page Factory)
With Page Factory, initElement() statement can be used for easily looking up elements in page class.
Page Factory allows storing of page elements in cache memory using @CacheLookup annotation.
1. Maintainability
2. Reusability
3. Flexibility
4. Optimized code
ADVANTAGES
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Hands-on:-
Page Object Model & Page Factory
Let’s learn how to implement POM & Page Factory.
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Session In A Minute
Why Use Page Object Model?
What Is Page Factory?
What Is Page Object Model?
Demo: POM & Page Factory In Selenium
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
WebDriver vs. IDE vs. RC
➢ Data Warehouse is like a relational database designed for analytical needs.
➢ It functions on the basis of OLAP (Online Analytical Processing).
➢ It is a central location where consolidated data from multiple locations (databases) are stored.

More Related Content

What's hot (20)

PPTX
Data driven Automation Framework with Selenium
Edureka!
 
PPTX
Test automation
Xavier Yin
 
PPTX
Automation Testing
Sun Technlogies
 
PDF
Selenium IDE LOCATORS
Mindfire Solutions
 
PPTX
Selenium
Batch2016
 
PPTX
Introduction to Selenium Web Driver
Return on Intelligence
 
PPTX
Test Automation and Selenium
Karapet Sarkisyan
 
PPT
Selenium Presentation at Engineering Colleges
Vijay Rangaiah
 
PPT
Selenium Automation Framework
Mindfire Solutions
 
PDF
Test Automation
rockoder
 
PPT
Test Automation Strategies For Agile
Naresh Jain
 
PPT
QSpiders - Automation using Selenium
Qspiders - Software Testing Training Institute
 
PPT
Hybrid framework
Sudhakar Mangi
 
PPT
Automation With A Tool Demo
Nivetha Padmanaban
 
PPTX
Automation Testing by Selenium Web Driver
Cuelogic Technologies Pvt. Ltd.
 
PPT
Selenium Concepts
Swati Bansal
 
PPT
Selenium
Adam Goucher
 
PDF
Automation Testing using Selenium Webdriver
Pankaj Biswas
 
PDF
Web application testing with Selenium
Kerry Buckley
 
PPT
Selenium
Kalyan ch
 
Data driven Automation Framework with Selenium
Edureka!
 
Test automation
Xavier Yin
 
Automation Testing
Sun Technlogies
 
Selenium IDE LOCATORS
Mindfire Solutions
 
Selenium
Batch2016
 
Introduction to Selenium Web Driver
Return on Intelligence
 
Test Automation and Selenium
Karapet Sarkisyan
 
Selenium Presentation at Engineering Colleges
Vijay Rangaiah
 
Selenium Automation Framework
Mindfire Solutions
 
Test Automation
rockoder
 
Test Automation Strategies For Agile
Naresh Jain
 
QSpiders - Automation using Selenium
Qspiders - Software Testing Training Institute
 
Hybrid framework
Sudhakar Mangi
 
Automation With A Tool Demo
Nivetha Padmanaban
 
Automation Testing by Selenium Web Driver
Cuelogic Technologies Pvt. Ltd.
 
Selenium Concepts
Swati Bansal
 
Selenium
Adam Goucher
 
Automation Testing using Selenium Webdriver
Pankaj Biswas
 
Web application testing with Selenium
Kerry Buckley
 
Selenium
Kalyan ch
 

Viewers also liked (20)

PDF
What Is DevOps? | Introduction To DevOps | DevOps Tools | DevOps Tutorial | D...
Edureka!
 
PDF
Angular 4 Tutorial For Beginners | Angular 4 Introduction | Angular 4 Trainin...
Edureka!
 
PDF
Django Rest Framework | How to Create a RESTful API Using Django | Django Tut...
Edureka!
 
PDF
Android Studio Tutorial For Beginners -2 | Android Development Tutorial | And...
Edureka!
 
PDF
Docker Swarm For High Availability | Docker Tutorial | DevOps Tutorial | Edureka
Edureka!
 
PDF
Artificial Neural Network Tutorial | Deep Learning With Neural Networks | Edu...
Edureka!
 
PDF
Docker Compose | Containerizing MEAN Stack Application | DevOps Tutorial | Ed...
Edureka!
 
PDF
Big Data Use Cases | Hadoop Tutorial for Beginners | Hadoop Training | Edureka
Edureka!
 
PDF
Power BI Training | Getting Started with Power BI | Power BI Tutorial | Power...
Edureka!
 
PDF
Bitcoin Blockchain Explained | Understanding Bitcoin and Blockchain | Blockch...
Edureka!
 
PDF
Angular 4 Components | Angular 4 Tutorial For Beginners | Learn Angular 4 | E...
Edureka!
 
PDF
Cloud Computing Tutorial For Beginners | What is Cloud Computing | AWS Traini...
Edureka!
 
PDF
Angular 4 Data Binding | Two Way Data Binding in Angular 4 | Angular 4 Tutori...
Edureka!
 
PDF
Introduction To TensorFlow | Deep Learning Using TensorFlow | TensorFlow Tuto...
Edureka!
 
PDF
Azure Interview Questions And Answers | Azure Tutorial For Beginners | Azure ...
Edureka!
 
PDF
React Components Lifecycle | React Tutorial for Beginners | ReactJS Training ...
Edureka!
 
PDF
Machine Learning In Python | Python Machine Learning Tutorial | Deep Learning...
Edureka!
 
PDF
ReactJS Tutorial For Beginners | ReactJS Redux Training For Beginners | React...
Edureka!
 
PDF
Big Data Tutorial For Beginners | What Is Big Data | Big Data Tutorial | Hado...
Edureka!
 
PDF
Introduction to Data Science
Edureka!
 
What Is DevOps? | Introduction To DevOps | DevOps Tools | DevOps Tutorial | D...
Edureka!
 
Angular 4 Tutorial For Beginners | Angular 4 Introduction | Angular 4 Trainin...
Edureka!
 
Django Rest Framework | How to Create a RESTful API Using Django | Django Tut...
Edureka!
 
Android Studio Tutorial For Beginners -2 | Android Development Tutorial | And...
Edureka!
 
Docker Swarm For High Availability | Docker Tutorial | DevOps Tutorial | Edureka
Edureka!
 
Artificial Neural Network Tutorial | Deep Learning With Neural Networks | Edu...
Edureka!
 
Docker Compose | Containerizing MEAN Stack Application | DevOps Tutorial | Ed...
Edureka!
 
Big Data Use Cases | Hadoop Tutorial for Beginners | Hadoop Training | Edureka
Edureka!
 
Power BI Training | Getting Started with Power BI | Power BI Tutorial | Power...
Edureka!
 
Bitcoin Blockchain Explained | Understanding Bitcoin and Blockchain | Blockch...
Edureka!
 
Angular 4 Components | Angular 4 Tutorial For Beginners | Learn Angular 4 | E...
Edureka!
 
Cloud Computing Tutorial For Beginners | What is Cloud Computing | AWS Traini...
Edureka!
 
Angular 4 Data Binding | Two Way Data Binding in Angular 4 | Angular 4 Tutori...
Edureka!
 
Introduction To TensorFlow | Deep Learning Using TensorFlow | TensorFlow Tuto...
Edureka!
 
Azure Interview Questions And Answers | Azure Tutorial For Beginners | Azure ...
Edureka!
 
React Components Lifecycle | React Tutorial for Beginners | ReactJS Training ...
Edureka!
 
Machine Learning In Python | Python Machine Learning Tutorial | Deep Learning...
Edureka!
 
ReactJS Tutorial For Beginners | ReactJS Redux Training For Beginners | React...
Edureka!
 
Big Data Tutorial For Beginners | What Is Big Data | Big Data Tutorial | Hado...
Edureka!
 
Introduction to Data Science
Edureka!
 
Ad

Similar to Selenium Page Object Model Using Page Factory | Selenium Tutorial For Beginners | Edureka (20)

PDF
TestingAR IX - Retorno de Inversión - POM TestingAr
TestingAR Meetup
 
PPTX
TestNet 2016 - Improving Your Selenium WebDriver Tests
Roy de Kleijn
 
PPTX
Out of box page object design pattern, java
COMAQA.BY
 
PPTX
Better Page Object Handling with Loadable Component Pattern
SQALab
 
PDF
Better Page Object Handling with Loadable Component Pattern - SQA Days 20, Be...
Sargis Sargsyan
 
PPTX
Improving Your Selenium WebDriver Tests - Belgium testing days_2016
Roy de Kleijn
 
PPTX
Out of box page object design pattern, java
COMAQA.BY
 
PPTX
Using Page Objects
Getch88
 
PDF
PageObject
MitinPavel
 
PDF
Better Page Object Handling with Loadable Component Pattern
Sargis Sargsyan
 
PDF
Design Patterns in Automation Framework.pdf
ArunVastrad4
 
PPTX
Marcin Wasilczyk - Page objects with selenium
Trójmiejska Grupa Testerska
 
PPTX
Web Test Automation
David Harrison
 
PDF
Advanced Techniques to Build an Efficient Selenium Framework
digitaljignect
 
PPTX
Better End-to-End Testing with Page Objects Model using Protractor
Kasun Kodagoda
 
PDF
Perils of Page-Object Pattern
Anand Bagmar
 
PDF
Page Objects - You're Doing it Wrong by Titus Fortner
Sauce Labs
 
PDF
Automation Abstractions: Page Objects and Beyond
TechWell
 
PDF
Using The Page Object Pattern
Dante Briones
 
PPTX
DSL, Page Object and WebDriver – the path to reliable functional tests.pptx
Mikalai Alimenkou
 
TestingAR IX - Retorno de Inversión - POM TestingAr
TestingAR Meetup
 
TestNet 2016 - Improving Your Selenium WebDriver Tests
Roy de Kleijn
 
Out of box page object design pattern, java
COMAQA.BY
 
Better Page Object Handling with Loadable Component Pattern
SQALab
 
Better Page Object Handling with Loadable Component Pattern - SQA Days 20, Be...
Sargis Sargsyan
 
Improving Your Selenium WebDriver Tests - Belgium testing days_2016
Roy de Kleijn
 
Out of box page object design pattern, java
COMAQA.BY
 
Using Page Objects
Getch88
 
PageObject
MitinPavel
 
Better Page Object Handling with Loadable Component Pattern
Sargis Sargsyan
 
Design Patterns in Automation Framework.pdf
ArunVastrad4
 
Marcin Wasilczyk - Page objects with selenium
Trójmiejska Grupa Testerska
 
Web Test Automation
David Harrison
 
Advanced Techniques to Build an Efficient Selenium Framework
digitaljignect
 
Better End-to-End Testing with Page Objects Model using Protractor
Kasun Kodagoda
 
Perils of Page-Object Pattern
Anand Bagmar
 
Page Objects - You're Doing it Wrong by Titus Fortner
Sauce Labs
 
Automation Abstractions: Page Objects and Beyond
TechWell
 
Using The Page Object Pattern
Dante Briones
 
DSL, Page Object and WebDriver – the path to reliable functional tests.pptx
Mikalai Alimenkou
 
Ad

More from Edureka! (20)

PDF
What to learn during the 21 days Lockdown | Edureka
Edureka!
 
PDF
Top 10 Dying Programming Languages in 2020 | Edureka
Edureka!
 
PDF
Top 5 Trending Business Intelligence Tools | Edureka
Edureka!
 
PDF
Tableau Tutorial for Data Science | Edureka
Edureka!
 
PDF
Python Programming Tutorial | Edureka
Edureka!
 
PDF
Top 5 PMP Certifications | Edureka
Edureka!
 
PDF
Top Maven Interview Questions in 2020 | Edureka
Edureka!
 
PDF
Linux Mint Tutorial | Edureka
Edureka!
 
PDF
How to Deploy Java Web App in AWS| Edureka
Edureka!
 
PDF
Importance of Digital Marketing | Edureka
Edureka!
 
PDF
RPA in 2020 | Edureka
Edureka!
 
PDF
Email Notifications in Jenkins | Edureka
Edureka!
 
PDF
EA Algorithm in Machine Learning | Edureka
Edureka!
 
PDF
Cognitive AI Tutorial | Edureka
Edureka!
 
PDF
AWS Cloud Practitioner Tutorial | Edureka
Edureka!
 
PDF
Blue Prism Top Interview Questions | Edureka
Edureka!
 
PDF
Big Data on AWS Tutorial | Edureka
Edureka!
 
PDF
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
Edureka!
 
PDF
Kubernetes Installation on Ubuntu | Edureka
Edureka!
 
PDF
Introduction to DevOps | Edureka
Edureka!
 
What to learn during the 21 days Lockdown | Edureka
Edureka!
 
Top 10 Dying Programming Languages in 2020 | Edureka
Edureka!
 
Top 5 Trending Business Intelligence Tools | Edureka
Edureka!
 
Tableau Tutorial for Data Science | Edureka
Edureka!
 
Python Programming Tutorial | Edureka
Edureka!
 
Top 5 PMP Certifications | Edureka
Edureka!
 
Top Maven Interview Questions in 2020 | Edureka
Edureka!
 
Linux Mint Tutorial | Edureka
Edureka!
 
How to Deploy Java Web App in AWS| Edureka
Edureka!
 
Importance of Digital Marketing | Edureka
Edureka!
 
RPA in 2020 | Edureka
Edureka!
 
Email Notifications in Jenkins | Edureka
Edureka!
 
EA Algorithm in Machine Learning | Edureka
Edureka!
 
Cognitive AI Tutorial | Edureka
Edureka!
 
AWS Cloud Practitioner Tutorial | Edureka
Edureka!
 
Blue Prism Top Interview Questions | Edureka
Edureka!
 
Big Data on AWS Tutorial | Edureka
Edureka!
 
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
Edureka!
 
Kubernetes Installation on Ubuntu | Edureka
Edureka!
 
Introduction to DevOps | Edureka
Edureka!
 

Recently uploaded (20)

PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
PPTX
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 

Selenium Page Object Model Using Page Factory | Selenium Tutorial For Beginners | Edureka

  • 1. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Agenda
  • 2. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Agenda For The Session i. Why Use Page Object Model (POM)? ii. What Is Page Object Model? iii. What Is Page Factory? iv. Demo: Creating POM & Page Factory
  • 3. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Why Use Page Object Model? A Web page has ‘x’ no. of elements, which are used in multiple test cases. Now if the path/locator of any element changes, then what happens? PROBLEM STATEMENT A web page with ‘x’ elements OH MY GOD !! Do I have to change the element locators in entire test script? Test Script SOLUTION Test case Element locator
  • 4. Copyright © 2017, edureka and/or its affiliates. All rights reserved. What Is Page Object Model? Page Object Model is a design pattern to create an Object Repository for web UI elements. Here, all the element locators used by the application will be stored in a class file separately from test case. Test Case Page Class Locators & test script stored separately POM Design Pattern • Element locators • Methods performing operations on elements. Page Class contains • Actual test scenario • Calls to methods in page class with arguments. Test Case contains
  • 5. Copyright © 2017, edureka and/or its affiliates. All rights reserved. What Is Page Factory? POM Implementation With Page Factory Without Page Factory • Uses By(). • No imports needed. • No cache storage. • Uses @FindBy(). • Import package: Page factory. • Cache lookup is faster. Page Factory is a built-in class in Selenium for maintaining object repository. (Import package: Page Factory) With Page Factory, initElement() statement can be used for easily looking up elements in page class. Page Factory allows storing of page elements in cache memory using @CacheLookup annotation. 1. Maintainability 2. Reusability 3. Flexibility 4. Optimized code ADVANTAGES
  • 6. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Hands-on:- Page Object Model & Page Factory Let’s learn how to implement POM & Page Factory.
  • 7. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Session In A Minute Why Use Page Object Model? What Is Page Factory? What Is Page Object Model? Demo: POM & Page Factory In Selenium
  • 8. Copyright © 2017, edureka and/or its affiliates. All rights reserved. WebDriver vs. IDE vs. RC ➢ Data Warehouse is like a relational database designed for analytical needs. ➢ It functions on the basis of OLAP (Online Analytical Processing). ➢ It is a central location where consolidated data from multiple locations (databases) are stored.