Test Automation / Quiz
Playwright Power Patterns
Auto-waiting, web-first assertions, network interception, and trace debugging, the features that separate Playwright users from Playwright experts.
- Difficulty
- Hard
- Format
- Quiz
- Points
- 200
- Estimate
- 9 min
// MISSION BRIEF
Your Mission
Playwright ships superpowers most teams never switch on: web-first assertions that retry, network routing, storage state, and time-travel traces.
Prove you know which tool solves which problem, and which "solutions" are actually anti-patterns smuggled in from the Selenium era.
// FIRST CONTACT
Battle teaser
await expect(locator).toHaveText('Saved') differs from expect(await locator.textContent()).toBe('Saved') because:
- AThey are identical in behavior
- BtoHaveText only works with data-testid locators
- CThe second form is faster and preferred
- DThe web-first assertion retries until timeout, it tolerates async rendering; the second reads once and can race
Answers, scoring, hints, and the full battle stay sealed.
// SKILL TAGS
playwrightassertionsnetwork-mockingtracing