lecture 8 of 160 completed

Modelling components, not pages

Modern applications are built from reusable widgets. A model organised by page duplicates every one of them.

What you'll learn

  • Why modelling pages duplicates every reusable widget
  • How scoping to a root keeps components safe
  • Why this is what survives a redesign

The same data grid appears on forty screens. In a page-per-class model, that grid is modelled forty times. When the grid's markup changes, forty page objects need editing, and the engineer doing it will miss three.

The application was not built that way. It was built from components, and your model should match.

A component object is a page object scoped to part of the screen.

full course

Keep reading with the full course

The Foundations track and the first lessons in each framework are free. This lesson needs full course access. A course plan includes all lessons for Playwright, Cypress and Selenium.

See course plans →