SlideShare a Scribd company logo
1 of 20
+
Creating Layered Object
Oriented Automation
Pattern By Anand Shirkande
Software Developer in Test at Telegraph
Media Group
+
Myths about POM
 POM is creating separate classes for each pages in
application.
 Adding all required web elements and methods in that class.
+
Messed Up..
 People create classes for different pages or functionality
 People add all required web elements and methods in that
class.
 People do not think in object oriented view beyond creating
classes for different pages or functionalities.
+
More Object Oriented..
 Observe your application in object oriented way.
 Create layers of your application in two parallel streams.
 First stream with layers of objects in your applications
 Second stream with layers of functionalities performed by each
layer of objects
+
How???
 First consider first page of your application as one class.
 List down different major components in your page class.
 List down different functionalities performed by those
components.
+
Implementing OOP to Page class:
 Now consider each individual major component as single class.
 Again apply layered class pattern to these components.
 Divide your one component into more granular components.
 Now consider each granular component as single class.
+
Finally :
 So ultimately you will have layers of classes.
 Your page class will have objects for major component classes.
 Your component classes will have objects for granular
component classes.
 Ultimately you will have object oriented mirror image of your
application.
+
Example:-
 Consider an ecommerce website.
 Consider a test case for searching an item and then sorting the
result list.
 Now we will create object oriented layered structure.
+
Continued..
 First of all, we see an application. So consider first class as
your application.
 Now we are on home page. Your home page is one component
of your application. Let’s consider your home page as second
class.
+
Continued..
 Now first test step is to search for one item.
For example I want to buy and iPhone. So I will search for
iPhone. I want cheapest one so I will sort result based on lowest
price first.
+
Continued..
 To search an item I have to interact with search input box and
search button.
 So lets consider this component as our next class.
+
Continued..
 Now once I search for iPhone then I will receive list of result.
 To select an item I have to interact with search result list.
 Lets consider this as our next class
+
Continued..
 Now my search result list may have multiple items from
different vendors.
 So my result list is made up of different search result item.
 So here is our next class for search result item.
+
List of Classes :
 Ultimately now we have different classes as
1. Application Class
2. Home Page Class
3. Search Panel Class
4. Search Result List Class
5. Search Result List Item Class
+
Layers of Classes :
 Now Search Panel class and Search Result List class are at
same layer.
 They are direct components of Home Page class.
+
Hierarchy /Layered structure :
Application
Home Page
Search
Panel
Search
Result List
Search
Result List
Item
Another
Page
+
Layers of Functionality :
 In similar way we will create layers of functionality.
 Each class will have the functionalities performed by that
component.
 We will need to analyze functionality with two points
- Whether that action is performed by object of that class
- Whether object of that class is calling method of lower layer class
to perform that action
+
Example:
 Ecommerce website have search functionality and sort result
functionality.
 When user want to search an item then user opens application
-> Go to Home Page -> Go to Search Panel -> and perform
search action.
 In similar way, our application class will have search
functionality which is not actually performed by object of tat
class rather application class object calls search functionality of
home page class.
+
Continued :
 Home page class will have search functionality. But rather
implementing search functionality in home page class , it
should actually call search functionality of Search panel in its
method.
 And finally logic/code for search functionality should be
implemented in search panel class.
+
Hierarchy/Layered Structure :
Application Class -
Search
Sort
Login
Home Page-
Search
Sort
Search Panel-
Search
Search Result List-
Sort
Search Result List
Item-
Comparator
implementation
Login Page-
Login

More Related Content

Similar to Layered object oriented automation pattern

2010 10-09 seo the secret sauce (svcc-2010)
2010 10-09 seo the secret sauce (svcc-2010)2010 10-09 seo the secret sauce (svcc-2010)
2010 10-09 seo the secret sauce (svcc-2010)
Massimo Paolini
 
Android tutorials7 calculator
Android tutorials7 calculatorAndroid tutorials7 calculator
Android tutorials7 calculator
Vlad Kolesnyk
 
Create yourfirstandroidapppdf
Create yourfirstandroidapppdfCreate yourfirstandroidapppdf
Create yourfirstandroidapppdf
murad3003
 

Similar to Layered object oriented automation pattern (20)

Create a Smooth & Satisfying Reader Experience using Metadata-Based Links...
Create a Smooth & Satisfying Reader Experience using Metadata-Based Links...Create a Smooth & Satisfying Reader Experience using Metadata-Based Links...
Create a Smooth & Satisfying Reader Experience using Metadata-Based Links...
 
Comparable and comparator – a detailed discussion
Comparable and comparator – a detailed discussionComparable and comparator – a detailed discussion
Comparable and comparator – a detailed discussion
 
Search Engine Optimization - Aykut Aslantaş
Search Engine Optimization - Aykut AslantaşSearch Engine Optimization - Aykut Aslantaş
Search Engine Optimization - Aykut Aslantaş
 
Vap2123
Vap2123Vap2123
Vap2123
 
eStudio34 presents London Search Love 2015 | Practical tips for the future o...
eStudio34 presents London Search Love 2015 |  Practical tips for the future o...eStudio34 presents London Search Love 2015 |  Practical tips for the future o...
eStudio34 presents London Search Love 2015 | Practical tips for the future o...
 
SearchLove London 2015 | Will Critchlow | Practical Tips for the Future of ...
SearchLove London 2015 |  Will Critchlow |  Practical Tips for the Future of ...SearchLove London 2015 |  Will Critchlow |  Practical Tips for the Future of ...
SearchLove London 2015 | Will Critchlow | Practical Tips for the Future of ...
 
How to Scrape Amazon Best Seller Lists with Python and BeautifulSoup.pdf
How to Scrape Amazon Best Seller Lists with Python and BeautifulSoup.pdfHow to Scrape Amazon Best Seller Lists with Python and BeautifulSoup.pdf
How to Scrape Amazon Best Seller Lists with Python and BeautifulSoup.pdf
 
Objects and classes in Visual Basic
Objects and classes in Visual BasicObjects and classes in Visual Basic
Objects and classes in Visual Basic
 
Thinking in react
Thinking in reactThinking in react
Thinking in react
 
2010 10-09 seo the secret sauce (svcc-2010)
2010 10-09 seo the secret sauce (svcc-2010)2010 10-09 seo the secret sauce (svcc-2010)
2010 10-09 seo the secret sauce (svcc-2010)
 
COMP111-Week-1_138439.pptx
COMP111-Week-1_138439.pptxCOMP111-Week-1_138439.pptx
COMP111-Week-1_138439.pptx
 
How to Scrape Amazon Best Seller Lists with Python and BeautifulSoup.pptx
How to Scrape Amazon Best Seller Lists with Python and BeautifulSoup.pptxHow to Scrape Amazon Best Seller Lists with Python and BeautifulSoup.pptx
How to Scrape Amazon Best Seller Lists with Python and BeautifulSoup.pptx
 
Intro To C++ - Class 05 - Introduction To Classes, Objects, & Strings
Intro To C++ - Class 05 - Introduction To  Classes, Objects, & StringsIntro To C++ - Class 05 - Introduction To  Classes, Objects, & Strings
Intro To C++ - Class 05 - Introduction To Classes, Objects, & Strings
 
Android tutorials7 calculator
Android tutorials7 calculatorAndroid tutorials7 calculator
Android tutorials7 calculator
 
Ios actions and outlets
Ios actions and outletsIos actions and outlets
Ios actions and outlets
 
Ios actions and outlets
Ios actions and outletsIos actions and outlets
Ios actions and outlets
 
Create yourfirstandroidapppdf
Create yourfirstandroidapppdfCreate yourfirstandroidapppdf
Create yourfirstandroidapppdf
 
A350103
A350103A350103
A350103
 
Class 1 blog
Class 1 blogClass 1 blog
Class 1 blog
 
"Salesforce"
"Salesforce""Salesforce"
"Salesforce"
 

Recently uploaded

Jax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined DeckJax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined Deck
Marc Lester
 

Recently uploaded (20)

Abortion Clinic In Springs ](+27832195400*)[ 🏥 Safe Abortion Pills in Springs...
Abortion Clinic In Springs ](+27832195400*)[ 🏥 Safe Abortion Pills in Springs...Abortion Clinic In Springs ](+27832195400*)[ 🏥 Safe Abortion Pills in Springs...
Abortion Clinic In Springs ](+27832195400*)[ 🏥 Safe Abortion Pills in Springs...
 
GraphSummit Milan - Neo4j: The Art of the Possible with Graph
GraphSummit Milan - Neo4j: The Art of the Possible with GraphGraphSummit Milan - Neo4j: The Art of the Possible with Graph
GraphSummit Milan - Neo4j: The Art of the Possible with Graph
 
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
 
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
 
Test Automation Design Patterns_ A Comprehensive Guide.pdf
Test Automation Design Patterns_ A Comprehensive Guide.pdfTest Automation Design Patterns_ A Comprehensive Guide.pdf
Test Automation Design Patterns_ A Comprehensive Guide.pdf
 
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
 
From Knowledge Graphs via Lego Bricks to scientific conversations.pptx
From Knowledge Graphs via Lego Bricks to scientific conversations.pptxFrom Knowledge Graphs via Lego Bricks to scientific conversations.pptx
From Knowledge Graphs via Lego Bricks to scientific conversations.pptx
 
Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...
Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...
Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...
 
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
 
Modern binary build systems - PyCon 2024
Modern binary build systems - PyCon 2024Modern binary build systems - PyCon 2024
Modern binary build systems - PyCon 2024
 
The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)
 
Evolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI EraEvolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI Era
 
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
 
OpenChain Webinar: AboutCode and Beyond - End-to-End SCA
OpenChain Webinar: AboutCode and Beyond - End-to-End SCAOpenChain Webinar: AboutCode and Beyond - End-to-End SCA
OpenChain Webinar: AboutCode and Beyond - End-to-End SCA
 
BusinessGPT - Security and Governance for Generative AI
BusinessGPT  - Security and Governance for Generative AIBusinessGPT  - Security and Governance for Generative AI
BusinessGPT - Security and Governance for Generative AI
 
Software Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements EngineeringSoftware Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements Engineering
 
The Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test AutomationThe Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test Automation
 
Lessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdfLessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdf
 
Jax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined DeckJax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined Deck
 
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit MilanWorkshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
 

Layered object oriented automation pattern

  • 1. + Creating Layered Object Oriented Automation Pattern By Anand Shirkande Software Developer in Test at Telegraph Media Group
  • 2. + Myths about POM  POM is creating separate classes for each pages in application.  Adding all required web elements and methods in that class.
  • 3. + Messed Up..  People create classes for different pages or functionality  People add all required web elements and methods in that class.  People do not think in object oriented view beyond creating classes for different pages or functionalities.
  • 4. + More Object Oriented..  Observe your application in object oriented way.  Create layers of your application in two parallel streams.  First stream with layers of objects in your applications  Second stream with layers of functionalities performed by each layer of objects
  • 5. + How???  First consider first page of your application as one class.  List down different major components in your page class.  List down different functionalities performed by those components.
  • 6. + Implementing OOP to Page class:  Now consider each individual major component as single class.  Again apply layered class pattern to these components.  Divide your one component into more granular components.  Now consider each granular component as single class.
  • 7. + Finally :  So ultimately you will have layers of classes.  Your page class will have objects for major component classes.  Your component classes will have objects for granular component classes.  Ultimately you will have object oriented mirror image of your application.
  • 8. + Example:-  Consider an ecommerce website.  Consider a test case for searching an item and then sorting the result list.  Now we will create object oriented layered structure.
  • 9. + Continued..  First of all, we see an application. So consider first class as your application.  Now we are on home page. Your home page is one component of your application. Let’s consider your home page as second class.
  • 10. + Continued..  Now first test step is to search for one item. For example I want to buy and iPhone. So I will search for iPhone. I want cheapest one so I will sort result based on lowest price first.
  • 11. + Continued..  To search an item I have to interact with search input box and search button.  So lets consider this component as our next class.
  • 12. + Continued..  Now once I search for iPhone then I will receive list of result.  To select an item I have to interact with search result list.  Lets consider this as our next class
  • 13. + Continued..  Now my search result list may have multiple items from different vendors.  So my result list is made up of different search result item.  So here is our next class for search result item.
  • 14. + List of Classes :  Ultimately now we have different classes as 1. Application Class 2. Home Page Class 3. Search Panel Class 4. Search Result List Class 5. Search Result List Item Class
  • 15. + Layers of Classes :  Now Search Panel class and Search Result List class are at same layer.  They are direct components of Home Page class.
  • 16. + Hierarchy /Layered structure : Application Home Page Search Panel Search Result List Search Result List Item Another Page
  • 17. + Layers of Functionality :  In similar way we will create layers of functionality.  Each class will have the functionalities performed by that component.  We will need to analyze functionality with two points - Whether that action is performed by object of that class - Whether object of that class is calling method of lower layer class to perform that action
  • 18. + Example:  Ecommerce website have search functionality and sort result functionality.  When user want to search an item then user opens application -> Go to Home Page -> Go to Search Panel -> and perform search action.  In similar way, our application class will have search functionality which is not actually performed by object of tat class rather application class object calls search functionality of home page class.
  • 19. + Continued :  Home page class will have search functionality. But rather implementing search functionality in home page class , it should actually call search functionality of Search panel in its method.  And finally logic/code for search functionality should be implemented in search panel class.
  • 20. + Hierarchy/Layered Structure : Application Class - Search Sort Login Home Page- Search Sort Search Panel- Search Search Result List- Sort Search Result List Item- Comparator implementation Login Page- Login