Page Objects                               101                              Adam Goucher                              @ada...
A language neutral pattern for                     representing a complete page                       or portion of a page...
3 [Big] Reasons                1.Maintenance                2.Readability of Scripts                3.Separation of Concer...
Scripts & Page ObjectsWednesday, July 27, 2011
Page ObjectsWednesday, July 27, 2011
Locators                    •      A specific locator appears                           only once in your entire set       ...
Elements                    •      Anything directly interacted                           with [via Selenium] is an       ...
Tip - Create common                         base classes for                             ElementsWednesday, July 27, 2011
Actions                    •      Repeated series of                           commands                    •      [Usually...
Synchronization                    •      In Synchronization                    • Out Synchronization                    •...
Tip - Create custom                 wait_for_* method in a                   common base POWednesday, July 27, 2011
Order of Operations                     1.Locator                     2.Element Implementation                     3.Add E...
Tip - Do NOT create                    the whole PO at once.                     Do ONLY what you                         ...
Asserts do not belong                             in POWednesday, July 27, 2011
ScriptsWednesday, July 27, 2011
Do not have                       synchronization codeWednesday, July 27, 2011
Do not have driver API                          callsWednesday, July 27, 2011
Do have interactions                                with POWednesday, July 27, 2011
Do have assertsWednesday, July 27, 2011
Upcoming SlideShare
Loading in...5
×

Selenium Page Objects101

25,305

Published on

Page Objects are a way of representing a page in an OO manner. This presentation introduces an implementation of the pattern and its components.

Published in: Technology
0 Comments
5 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
25,305
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
60
Comments
0
Likes
5
Embeds 0
No embeds

No notes for slide

Selenium Page Objects101

  1. 1. Page Objects 101 Adam Goucher @adamgoucher adam@element34.caWednesday, July 27, 2011
  2. 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. 3 [Big] Reasons 1.Maintenance 2.Readability of Scripts 3.Separation of ConcernsWednesday, July 27, 2011
  4. 4. Scripts & Page ObjectsWednesday, July 27, 2011
  5. 5. Page ObjectsWednesday, July 27, 2011
  6. 6. Locators • A specific locator appears only once in your entire set of PO • Locators do not cross PO boundariesWednesday, July 27, 2011
  7. 7. Elements • Anything directly interacted with [via Selenium] is an Element • Elements override Get/SetWednesday, July 27, 2011
  8. 8. Tip - Create common base classes for ElementsWednesday, July 27, 2011
  9. 9. Actions • Repeated series of commands • [Usually] Named with verbs • [Often] Require SyncWednesday, July 27, 2011
  10. 10. Synchronization • In Synchronization • Out Synchronization • ‘Flag’ drivenWednesday, July 27, 2011
  11. 11. Tip - Create custom wait_for_* method in a common base POWednesday, July 27, 2011
  12. 12. Order of Operations 1.Locator 2.Element Implementation 3.Add Element to Page Object 4.ActionsWednesday, July 27, 2011
  13. 13. Tip - Do NOT create the whole PO at once. Do ONLY what you need now.Wednesday, July 27, 2011
  14. 14. Asserts do not belong in POWednesday, July 27, 2011
  15. 15. ScriptsWednesday, July 27, 2011
  16. 16. Do not have synchronization codeWednesday, July 27, 2011
  17. 17. Do not have driver API callsWednesday, July 27, 2011
  18. 18. Do have interactions with POWednesday, July 27, 2011
  19. 19. Do have assertsWednesday, July 27, 2011
  1. ¿Le ha llamado la atención una diapositiva en particular?

    Recortar diapositivas es una manera útil de recopilar información importante para consultarla más tarde.

×