Beyond Page Objects
summary
Argues that replacing monolithic page objects with page components (small classes for compressed/expanded views) plus a component Factory cuts duplication, models user focus via return types, and shrinks class size; demonstrates on a Pivotal Tracker–like rich app and recommends switching from Selenium 1 to WebDriver to avoid custom waits. Introduces an indexed locator class to generate nth selectors and stresses synchronization with explicit waits rather than sleeps, claiming noticeably more readable, maintainable, less flaky tests.
AI-written summary · about
chapters (32)
- 0:00Intro
- 1:07Our Hero
- 1:59A Chance Encounter
- 2:27A New Weapon
- 2:39Engaging The Enemy
- 2:55Victory
- 3:15What's The Moral?
- 3:51The Details
- 5:01Why Page Objects?
- 6:05Readability
- 6:24Stay DRY
- 7:04Sensible Names
- 7:15Small Classes
- 7:58How Do We Get There?
- 9:13Context
- 9:53PRO TIP
- 10:22Page Objects Recap
- 10:58Page Object Benefits
- 12:33Example: Pivotal Tracker
- 15:25Modeling The UI
- 21:18Page Component Recap
- 24:28ComponentFactory Recap
- 26:29Indexed Components
- 29:25The Locator Class
- 30:14Using A Locator
- 31:07Synchronization Issues
- 32:40Use The Wait Class
- 33:08Two Options
- 34:06Next Issue
- 34:26Cleanest Solution
- 34:59Next Best Solution
- 36:06Final Thoughts
related talks
40mPage Objects: Keep It Simple and Better!
51mEverything you want to know about Page Object design pattern (Mikalai Alimenkou, Ukraine), part 1
46mEverything you want to know about Page Object design pattern (Mikalai Alimenkou, Ukraine), part 2
37mKISS PageObjects
47mOn the Other Side of Page Object
31mIn the Footsteps of Martin Fowler: Extending the Scope of the Page Object
55mVersioned Page Objects: How to handle 12 versions of webapp
21mWriting Declarative, Maintainable Integration Tests Using Page Objects
