SlideShare a Scribd company logo
3
Most read
4
Most read
5
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)

ODP
BDD with Cucumber
Knoldus Inc.
 
PDF
Playwright: A New Test Automation Framework for the Modern Web
Applitools
 
PPT
Test Automation Framework Designs
Sauce Labs
 
PPT
Hybrid Automation Framework Development introduction
Ganuka Yashantha
 
PPTX
Cypress Testing.pptx
JasmeenShrestha
 
PPTX
Intro to React
Justin Reock
 
PDF
Cypress - Best Practices
Brian Mann
 
PDF
Unit Testing in Angular
Knoldus Inc.
 
PDF
Cucumber ppt
Qwinix Technologies
 
PPTX
Selenium WebDriver training
Vijay Krishnan Ramaswamy
 
PPTX
TestNG Framework
Levon Apreyan
 
PPTX
Cypress Automation
Susantha Pathirana
 
PPTX
Robot Framework
Onur Baskirt
 
PDF
DevOps Testing | Continuous Testing In DevOps | DevOps Tutorial | DevOps Trai...
Edureka!
 
PPT
Selenium Concepts
Swati Bansal
 
PPTX
Introduction to Selenium Web Driver
Return on Intelligence
 
DOCX
Automation Testing Syllabus - Checklist
Sunil Kumar Gunasekaran
 
PPTX
Saving Time By Testing With Jest
Ben McCormick
 
PPS
JUnit Presentation
priya_trivedi
 
PDF
How to go about testing in React?
Lisa Gagarina
 
BDD with Cucumber
Knoldus Inc.
 
Playwright: A New Test Automation Framework for the Modern Web
Applitools
 
Test Automation Framework Designs
Sauce Labs
 
Hybrid Automation Framework Development introduction
Ganuka Yashantha
 
Cypress Testing.pptx
JasmeenShrestha
 
Intro to React
Justin Reock
 
Cypress - Best Practices
Brian Mann
 
Unit Testing in Angular
Knoldus Inc.
 
Cucumber ppt
Qwinix Technologies
 
Selenium WebDriver training
Vijay Krishnan Ramaswamy
 
TestNG Framework
Levon Apreyan
 
Cypress Automation
Susantha Pathirana
 
Robot Framework
Onur Baskirt
 
DevOps Testing | Continuous Testing In DevOps | DevOps Tutorial | DevOps Trai...
Edureka!
 
Selenium Concepts
Swati Bansal
 
Introduction to Selenium Web Driver
Return on Intelligence
 
Automation Testing Syllabus - Checklist
Sunil Kumar Gunasekaran
 
Saving Time By Testing With Jest
Ben McCormick
 
JUnit Presentation
priya_trivedi
 
How to go about testing in React?
Lisa Gagarina
 

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
 
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
 
PDF
Automation Abstraction Layers: Page Objects and Beyond
Alan Richardson
 
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
 
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
 
Automation Abstraction Layers: Page Objects and Beyond
Alan Richardson
 
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)

PPSX
Usergroup - OutSystems Architecture.ppsx
Kurt Vandevelde
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PPTX
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
pcprocore
 
PDF
Why aren't you using FME Flow's CPU Time?
Safe Software
 
PDF
Enhancing Environmental Monitoring with Real-Time Data Integration: Leveragin...
Safe Software
 
PPTX
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Poster...
Michele Kryston
 
PDF
The Future of Product Management in AI ERA.pdf
Alyona Owens
 
PDF
Quantum AI Discoveries: Fractal Patterns Consciousness and Cyclical Universes
Saikat Basu
 
PDF
Java 25 and Beyond - A Roadmap of Innovations
Ana-Maria Mihalceanu
 
PDF
Hello I'm "AI" Your New _________________
Dr. Tathagat Varma
 
PDF
Database Benchmarking for Performance Masterclass: Session 1 - Benchmarking F...
ScyllaDB
 
PPTX
UserCon Belgium: Honey, VMware increased my bill
stijn40
 
PPTX
Enabling the Digital Artisan – keynote at ICOCI 2025
Alan Dix
 
PPTX
𝙳𝚘𝚠𝚗𝚕𝚘𝚊𝚍—Wondershare Filmora Crack 14.0.7 + Key Download 2025
sebastian aliya
 
PDF
Darley - FIRST Copenhagen Lightning Talk (2025-06-26) Epochalypse 2038 - Time...
treyka
 
PDF
How to Visualize the ​Spatio-Temporal Data Using CesiumJS​
SANGHEE SHIN
 
PPTX
Practical Applications of AI in Local Government
OnBoard
 
PDF
UiPath Agentic AI ile Akıllı Otomasyonun Yeni Çağı
UiPathCommunity
 
PPTX
Paycifi - Programmable Trust_Breakfast_PPTXT
FinTech Belgium
 
PDF
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
Priyanka Aash
 
Usergroup - OutSystems Architecture.ppsx
Kurt Vandevelde
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
pcprocore
 
Why aren't you using FME Flow's CPU Time?
Safe Software
 
Enhancing Environmental Monitoring with Real-Time Data Integration: Leveragin...
Safe Software
 
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Poster...
Michele Kryston
 
The Future of Product Management in AI ERA.pdf
Alyona Owens
 
Quantum AI Discoveries: Fractal Patterns Consciousness and Cyclical Universes
Saikat Basu
 
Java 25 and Beyond - A Roadmap of Innovations
Ana-Maria Mihalceanu
 
Hello I'm "AI" Your New _________________
Dr. Tathagat Varma
 
Database Benchmarking for Performance Masterclass: Session 1 - Benchmarking F...
ScyllaDB
 
UserCon Belgium: Honey, VMware increased my bill
stijn40
 
Enabling the Digital Artisan – keynote at ICOCI 2025
Alan Dix
 
𝙳𝚘𝚠𝚗𝚕𝚘𝚊𝚍—Wondershare Filmora Crack 14.0.7 + Key Download 2025
sebastian aliya
 
Darley - FIRST Copenhagen Lightning Talk (2025-06-26) Epochalypse 2038 - Time...
treyka
 
How to Visualize the ​Spatio-Temporal Data Using CesiumJS​
SANGHEE SHIN
 
Practical Applications of AI in Local Government
OnBoard
 
UiPath Agentic AI ile Akıllı Otomasyonun Yeni Çağı
UiPathCommunity
 
Paycifi - Programmable Trust_Breakfast_PPTXT
FinTech Belgium
 
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
Priyanka Aash
 

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.