Playwright interview questions — Medium
803 medium-level Playwright questions from our Automation Testing bank, each with the correct answer and an explanation of why it is correct.
What this covers
Playwright appears throughout Automation Testing interviews. At medium level, interviewers are typically checking that you have used it in practice: what you configured, what broke, and how you knew it worked. Work through these, then explain your answer out loud; the second part is what interviews actually test.
2 example questions
1. Which Playwright tool lets you replay a recorded run with DOM snapshots, network, and console to debug failures?
- A. Selenium IDE.
- B. Trace Viewer.correct
- C. JMeter Listener.
- D. Appium Inspector.
Why: Playwright's Trace Viewer replays a run with screenshots, DOM snapshots, network, and console logs — excellent for diagnosing CI failures.
2. Playwright's web-first assertions like expect(locator).toBeVisible() are special because they…
- A. Run only once with no retry.
- B. Auto-wait and retry until the condition is met or the timeout expires.correct
- C. Require a manual sleep first.
- D. Only work in headed mode.
Why: Playwright's web-first assertions auto-retry until the expectation holds or times out, reducing flakiness from timing.