Page Object Model in Playwright with TypeScript: a minimal example (and a baseURL trap)
A Page Object Model (POM) puts the selectors and actions of one page in one class, so your tests read like intentions and a UI change is fixed in one place. Here is the smallest version that is still useful, written for Playwright Test with TypeScript.