Playwright · Senior · Question 37 of 77
What is an alternative to deep page object inheritance?
- 1Composition: small component objects and fixtures
- 2One base class that every page object extends
- 3Copying the same locators into every test file
Show the answer
Correct answer: Composition: small component objects and fixtures
Explanation
Components like Header or DatePicker can be reused across pages. Fixtures assemble what each test needs.