How I Create Page Objects (In Cypress) @gleb
How I Create Page Objects (In Cypress)  @gleb
Uploaded January 2025 | Updated September 2026, 1 week ago
This video shows how I create page objects for my Cypress end-to-end tests:
- wait for at least a few tests to be finished and working
- find common functionality on the page: visiting and waiting for the page to load, data reset, adding new items
- create page object methods (I use simply static objects)
- think about what the page method returns. Typically void, but some methods can return Cypress chain command so we can add additional commands and assertions
Find the full source code in the pull request github.com/bahmutov/todomvc-callback-example/pull/1
How I Create Page Objects (In Cypress)Chai Nested Property Assertion In Cypresscy.difference Command With PredicatesConfirming Multiple Data- Values Using DOM Element DataSet PropertyClick In ParallelComponent Testing With Murat Ozcan: Cy vs Pw vs VitestRemove The Middle ElementCypress Random Data And Custom Commands ExampleSame HeightSelect Hidden Or Visible ElementsUse Sanity AssertionsCypress Custom Commands With Multiple DOM Snapshots
gleb bahmutov |

How I Create Page Objects (In Cypress)

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER