SlideShare ist ein Scribd-Unternehmen logo
1 von 19
Downloaden Sie, um offline zu lesen
Page Objects
                               101
                              Adam Goucher
                              @adamgoucher
                            adam@element34.ca




Wednesday, July 27, 2011
A language neutral pattern for
                     representing a complete page
                       or portion of a page in an
                       Object Oriented manner.



Wednesday, July 27, 2011
3 [Big] Reasons

                1.Maintenance
                2.Readability of Scripts
                3.Separation of Concerns


Wednesday, July 27, 2011
Scripts & Page Objects



Wednesday, July 27, 2011
Page Objects



Wednesday, July 27, 2011
Locators

                    •      A specific locator appears
                           only once in your entire set
                           of PO
                    •      Locators do not cross PO
                           boundaries

Wednesday, July 27, 2011
Elements

                    •      Anything directly interacted
                           with [via Selenium] is an
                           Element
                    • Elements override Get/Set
Wednesday, July 27, 2011
Tip - Create common
                         base classes for
                             Elements


Wednesday, July 27, 2011
Actions

                    •      Repeated series of
                           commands
                    •      [Usually] Named with verbs
                    • [Often] Require Sync
Wednesday, July 27, 2011
Synchronization

                    •      In Synchronization
                    • Out Synchronization
                    • ‘Flag’ driven


Wednesday, July 27, 2011
Tip - Create custom
                 wait_for_* method in a
                   common base PO


Wednesday, July 27, 2011
Order of Operations

                     1.Locator
                     2.Element Implementation
                     3.Add Element to Page Object
                     4.Actions

Wednesday, July 27, 2011
Tip - Do NOT create
                    the whole PO at once.
                     Do ONLY what you
                           need now.
Wednesday, July 27, 2011
Asserts do not belong
                             in PO


Wednesday, July 27, 2011
Scripts



Wednesday, July 27, 2011
Do not have
                       synchronization code


Wednesday, July 27, 2011
Do not have driver API
                          calls


Wednesday, July 27, 2011
Do have interactions
                                with PO


Wednesday, July 27, 2011
Do have asserts



Wednesday, July 27, 2011

Weitere ähnliche Inhalte

Andere mochten auch

JUnit Kung Fu: Getting More Out of Your Unit Tests
JUnit Kung Fu: Getting More Out of Your Unit TestsJUnit Kung Fu: Getting More Out of Your Unit Tests
JUnit Kung Fu: Getting More Out of Your Unit TestsJohn Ferguson Smart Limited
 
Continuous Integration, the minimum viable product
Continuous Integration, the minimum viable productContinuous Integration, the minimum viable product
Continuous Integration, the minimum viable productJulian Simpson
 
Selenium Users Anonymous
Selenium Users AnonymousSelenium Users Anonymous
Selenium Users AnonymousDave Haeffner
 
Mobile Test Automation at eBay
Mobile Test Automation at eBayMobile Test Automation at eBay
Mobile Test Automation at eBayDominik Dary
 
Continuous Deployment - Lean LA
Continuous Deployment - Lean LAContinuous Deployment - Lean LA
Continuous Deployment - Lean LAAsh Maurya
 
Creating Maintainable Automated Acceptance Tests
Creating Maintainable Automated Acceptance TestsCreating Maintainable Automated Acceptance Tests
Creating Maintainable Automated Acceptance TestsJez Humble
 

Andere mochten auch (6)

JUnit Kung Fu: Getting More Out of Your Unit Tests
JUnit Kung Fu: Getting More Out of Your Unit TestsJUnit Kung Fu: Getting More Out of Your Unit Tests
JUnit Kung Fu: Getting More Out of Your Unit Tests
 
Continuous Integration, the minimum viable product
Continuous Integration, the minimum viable productContinuous Integration, the minimum viable product
Continuous Integration, the minimum viable product
 
Selenium Users Anonymous
Selenium Users AnonymousSelenium Users Anonymous
Selenium Users Anonymous
 
Mobile Test Automation at eBay
Mobile Test Automation at eBayMobile Test Automation at eBay
Mobile Test Automation at eBay
 
Continuous Deployment - Lean LA
Continuous Deployment - Lean LAContinuous Deployment - Lean LA
Continuous Deployment - Lean LA
 
Creating Maintainable Automated Acceptance Tests
Creating Maintainable Automated Acceptance TestsCreating Maintainable Automated Acceptance Tests
Creating Maintainable Automated Acceptance Tests
 

Ähnlich wie Selenium Page Objects101

2011 july-gtug-high-replication-datastore
2011 july-gtug-high-replication-datastore2011 july-gtug-high-replication-datastore
2011 july-gtug-high-replication-datastoreikailan
 
MDW Boulder April '11 | Tim Malbon_How to actually make something
MDW Boulder April '11 | Tim Malbon_How to actually make somethingMDW Boulder April '11 | Tim Malbon_How to actually make something
MDW Boulder April '11 | Tim Malbon_How to actually make somethingBoulder Digital Works at CU
 
David Mytton, Boxed Ice
David Mytton, Boxed Ice   David Mytton, Boxed Ice
David Mytton, Boxed Ice Mashery
 
Ruby can haz Everyone
Ruby can haz EveryoneRuby can haz Everyone
Ruby can haz EveryoneRubyX
 
Когда хуже - лучше
Когда хуже - лучшеКогда хуже - лучше
Когда хуже - лучшеYuriy Artyukh
 
Atlassian RoadTrip 2011 Slide Deck
Atlassian RoadTrip 2011 Slide DeckAtlassian RoadTrip 2011 Slide Deck
Atlassian RoadTrip 2011 Slide DeckAtlassian
 
Building an experimentation framework
Building an experimentation frameworkBuilding an experimentation framework
Building an experimentation frameworkzsqr
 
Replacing Telco DB/DW to Hadoop and Hive
Replacing Telco DB/DW to Hadoop and HiveReplacing Telco DB/DW to Hadoop and Hive
Replacing Telco DB/DW to Hadoop and HiveJunHo Cho
 
Creating common assessments in Limelight
Creating common assessments in LimelightCreating common assessments in Limelight
Creating common assessments in LimelightTerri Sallee
 
Erlang: Bult for concurrent, distributed systems
Erlang: Bult for concurrent, distributed systemsErlang: Bult for concurrent, distributed systems
Erlang: Bult for concurrent, distributed systemsKen Pratt
 
Clouds against the Floods (RubyConfBR2011)
Clouds against the Floods (RubyConfBR2011) Clouds against the Floods (RubyConfBR2011)
Clouds against the Floods (RubyConfBR2011) Leonardo Borges
 
Rails Admin - Guru SP
Rails Admin - Guru SPRails Admin - Guru SP
Rails Admin - Guru SPFabio Akita
 

Ähnlich wie Selenium Page Objects101 (19)

2011 july-gtug-high-replication-datastore
2011 july-gtug-high-replication-datastore2011 july-gtug-high-replication-datastore
2011 july-gtug-high-replication-datastore
 
Yeswecan
YeswecanYeswecan
Yeswecan
 
MDW Boulder April '11 | Tim Malbon_How to actually make something
MDW Boulder April '11 | Tim Malbon_How to actually make somethingMDW Boulder April '11 | Tim Malbon_How to actually make something
MDW Boulder April '11 | Tim Malbon_How to actually make something
 
David Mytton, Boxed Ice
David Mytton, Boxed Ice   David Mytton, Boxed Ice
David Mytton, Boxed Ice
 
Alternative Software Development Methodology
Alternative Software Development MethodologyAlternative Software Development Methodology
Alternative Software Development Methodology
 
Agile xptdd@gosoft
Agile xptdd@gosoftAgile xptdd@gosoft
Agile xptdd@gosoft
 
Agile xp tdd@gosoft
Agile xp tdd@gosoftAgile xp tdd@gosoft
Agile xp tdd@gosoft
 
Ruby can haz Everyone
Ruby can haz EveryoneRuby can haz Everyone
Ruby can haz Everyone
 
Namesmatter
NamesmatterNamesmatter
Namesmatter
 
Когда хуже - лучше
Когда хуже - лучшеКогда хуже - лучше
Когда хуже - лучше
 
Atlassian RoadTrip 2011 Slide Deck
Atlassian RoadTrip 2011 Slide DeckAtlassian RoadTrip 2011 Slide Deck
Atlassian RoadTrip 2011 Slide Deck
 
Building an experimentation framework
Building an experimentation frameworkBuilding an experimentation framework
Building an experimentation framework
 
Replacing Telco DB/DW to Hadoop and Hive
Replacing Telco DB/DW to Hadoop and HiveReplacing Telco DB/DW to Hadoop and Hive
Replacing Telco DB/DW to Hadoop and Hive
 
Creating common assessments in Limelight
Creating common assessments in LimelightCreating common assessments in Limelight
Creating common assessments in Limelight
 
Node Stream
Node StreamNode Stream
Node Stream
 
Erlang: Bult for concurrent, distributed systems
Erlang: Bult for concurrent, distributed systemsErlang: Bult for concurrent, distributed systems
Erlang: Bult for concurrent, distributed systems
 
Beyond Page Objects
Beyond Page ObjectsBeyond Page Objects
Beyond Page Objects
 
Clouds against the Floods (RubyConfBR2011)
Clouds against the Floods (RubyConfBR2011) Clouds against the Floods (RubyConfBR2011)
Clouds against the Floods (RubyConfBR2011)
 
Rails Admin - Guru SP
Rails Admin - Guru SPRails Admin - Guru SP
Rails Admin - Guru SP
 

Mehr von Adam Goucher

Lightsabers, Time Machines and other Automation Heuristics
Lightsabers, Time Machines and other Automation HeuristicsLightsabers, Time Machines and other Automation Heuristics
Lightsabers, Time Machines and other Automation HeuristicsAdam Goucher
 
SeleniumConf London 2019 - "Part 3: Practice what you Preach"
SeleniumConf London 2019 - "Part 3: Practice what you Preach"SeleniumConf London 2019 - "Part 3: Practice what you Preach"
SeleniumConf London 2019 - "Part 3: Practice what you Preach"Adam Goucher
 
Is your Automation Infrastructure ‘Well Architected’?
Is your Automation Infrastructure ‘Well Architected’?Is your Automation Infrastructure ‘Well Architected’?
Is your Automation Infrastructure ‘Well Architected’?Adam Goucher
 
Your Job Is To Collect Stories
Your Job Is To Collect StoriesYour Job Is To Collect Stories
Your Job Is To Collect StoriesAdam Goucher
 
[Automation] Trick-or-Treat Style
[Automation] Trick-or-Treat Style[Automation] Trick-or-Treat Style
[Automation] Trick-or-Treat StyleAdam Goucher
 
Proxy and Executor
Proxy and ExecutorProxy and Executor
Proxy and ExecutorAdam Goucher
 
Maintainable Automation FTW
Maintainable Automation FTWMaintainable Automation FTW
Maintainable Automation FTWAdam Goucher
 
Selenium IDE - The future if plugin-y
Selenium IDE - The future if plugin-ySelenium IDE - The future if plugin-y
Selenium IDE - The future if plugin-yAdam Goucher
 
You're doing it wrong
You're doing it wrongYou're doing it wrong
You're doing it wrongAdam Goucher
 
Everything I learned about Agile I learned from Pirates
Everything I learned about Agile I learned from PiratesEverything I learned about Agile I learned from Pirates
Everything I learned about Agile I learned from PiratesAdam Goucher
 
Agile Test Case Management
Agile Test Case ManagementAgile Test Case Management
Agile Test Case ManagementAdam Goucher
 
The Many Hats of a Tester
The Many Hats of a TesterThe Many Hats of a Tester
The Many Hats of a TesterAdam Goucher
 
Testing inspiration
Testing inspirationTesting inspiration
Testing inspirationAdam Goucher
 
Agile Hats Art Show
Agile Hats Art ShowAgile Hats Art Show
Agile Hats Art ShowAdam Goucher
 
Quality through the lens of Astrophysics
Quality through the lens of AstrophysicsQuality through the lens of Astrophysics
Quality through the lens of AstrophysicsAdam Goucher
 
Legend of Zealot Anarchist Robot
Legend of Zealot Anarchist RobotLegend of Zealot Anarchist Robot
Legend of Zealot Anarchist RobotAdam Goucher
 
Scripting Recipes KWSQA2009
Scripting Recipes KWSQA2009Scripting Recipes KWSQA2009
Scripting Recipes KWSQA2009Adam Goucher
 
Scripting Recipes for Testers
Scripting Recipes for TestersScripting Recipes for Testers
Scripting Recipes for TestersAdam Goucher
 

Mehr von Adam Goucher (20)

Lightsabers, Time Machines and other Automation Heuristics
Lightsabers, Time Machines and other Automation HeuristicsLightsabers, Time Machines and other Automation Heuristics
Lightsabers, Time Machines and other Automation Heuristics
 
SeleniumConf London 2019 - "Part 3: Practice what you Preach"
SeleniumConf London 2019 - "Part 3: Practice what you Preach"SeleniumConf London 2019 - "Part 3: Practice what you Preach"
SeleniumConf London 2019 - "Part 3: Practice what you Preach"
 
Is your Automation Infrastructure ‘Well Architected’?
Is your Automation Infrastructure ‘Well Architected’?Is your Automation Infrastructure ‘Well Architected’?
Is your Automation Infrastructure ‘Well Architected’?
 
Your Job Is To Collect Stories
Your Job Is To Collect StoriesYour Job Is To Collect Stories
Your Job Is To Collect Stories
 
[Automation] Trick-or-Treat Style
[Automation] Trick-or-Treat Style[Automation] Trick-or-Treat Style
[Automation] Trick-or-Treat Style
 
Proxy and Executor
Proxy and ExecutorProxy and Executor
Proxy and Executor
 
Maintainable Automation FTW
Maintainable Automation FTWMaintainable Automation FTW
Maintainable Automation FTW
 
Selenium IDE - The future if plugin-y
Selenium IDE - The future if plugin-ySelenium IDE - The future if plugin-y
Selenium IDE - The future if plugin-y
 
You're doing it wrong
You're doing it wrongYou're doing it wrong
You're doing it wrong
 
Everything I learned about Agile I learned from Pirates
Everything I learned about Agile I learned from PiratesEverything I learned about Agile I learned from Pirates
Everything I learned about Agile I learned from Pirates
 
Agile Test Case Management
Agile Test Case ManagementAgile Test Case Management
Agile Test Case Management
 
Mitigation
MitigationMitigation
Mitigation
 
The Many Hats of a Tester
The Many Hats of a TesterThe Many Hats of a Tester
The Many Hats of a Tester
 
Testing inspiration
Testing inspirationTesting inspiration
Testing inspiration
 
Archetypes
ArchetypesArchetypes
Archetypes
 
Agile Hats Art Show
Agile Hats Art ShowAgile Hats Art Show
Agile Hats Art Show
 
Quality through the lens of Astrophysics
Quality through the lens of AstrophysicsQuality through the lens of Astrophysics
Quality through the lens of Astrophysics
 
Legend of Zealot Anarchist Robot
Legend of Zealot Anarchist RobotLegend of Zealot Anarchist Robot
Legend of Zealot Anarchist Robot
 
Scripting Recipes KWSQA2009
Scripting Recipes KWSQA2009Scripting Recipes KWSQA2009
Scripting Recipes KWSQA2009
 
Scripting Recipes for Testers
Scripting Recipes for TestersScripting Recipes for Testers
Scripting Recipes for Testers
 

Kürzlich hochgeladen

My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 

Kürzlich hochgeladen (20)

My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 

Selenium Page Objects101

  • 1. Page Objects 101 Adam Goucher @adamgoucher adam@element34.ca Wednesday, July 27, 2011
  • 2. A language neutral pattern for representing a complete page or portion of a page in an Object Oriented manner. Wednesday, July 27, 2011
  • 3. 3 [Big] Reasons 1.Maintenance 2.Readability of Scripts 3.Separation of Concerns Wednesday, July 27, 2011
  • 4. Scripts & Page Objects Wednesday, July 27, 2011
  • 6. Locators • A specific locator appears only once in your entire set of PO • Locators do not cross PO boundaries Wednesday, July 27, 2011
  • 7. Elements • Anything directly interacted with [via Selenium] is an Element • Elements override Get/Set Wednesday, July 27, 2011
  • 8. Tip - Create common base classes for Elements Wednesday, July 27, 2011
  • 9. Actions • Repeated series of commands • [Usually] Named with verbs • [Often] Require Sync Wednesday, July 27, 2011
  • 10. Synchronization • In Synchronization • Out Synchronization • ‘Flag’ driven Wednesday, July 27, 2011
  • 11. Tip - Create custom wait_for_* method in a common base PO Wednesday, July 27, 2011
  • 12. Order of Operations 1.Locator 2.Element Implementation 3.Add Element to Page Object 4.Actions Wednesday, July 27, 2011
  • 13. Tip - Do NOT create the whole PO at once. Do ONLY what you need now. Wednesday, July 27, 2011
  • 14. Asserts do not belong in PO Wednesday, July 27, 2011
  • 16. Do not have synchronization code Wednesday, July 27, 2011
  • 17. Do not have driver API calls Wednesday, July 27, 2011
  • 18. Do have interactions with PO Wednesday, July 27, 2011
  • 19. Do have asserts Wednesday, July 27, 2011