5 technical interview questions with model answers — practise the English vocabulary and structure of strong Playwright responses.
0 / 5 completed
1 / 5
The interviewer asks: "How do you make your Playwright selectors resilient to UI changes?" Which answer best demonstrates expertise?
Option B is strongest: it explains the reasoning (semantic matching, accessibility signal) not just the preference. Option A (CSS selectors) is fragile. Option C (test-ids) is acceptable but doesn't explain the trade-off. Option D (XPath) is rarely preferred in modern Playwright.
2 / 5
The interviewer asks: "Explain how Playwright fixtures work." Which answer is most complete?
Option C demonstrates depth: composability, lazy evaluation, and scoping are the three key fixture concepts. Option A and B show surface-level understanding. Option D is incorrect — fixtures don't automatically mock; that's MSW or route handlers.
3 / 5
The interviewer asks: "How do you debug a flaky test that fails only in CI?"
Option C shows systematic debugging: trace-first, then hypothesis-driven investigation. Mentioning trace, viewport differences, and CPU throttling shows real CI debugging experience. Options A, B, and D are poor practices that don't address the root cause.
4 / 5
The interviewer asks: "When would you use the Page Object Model?"
Option C shows pragmatic judgment: not dogmatic about POM, but articulates when it adds value (scale, repeated journeys) vs when it's overhead (simple tests). This "it depends" answer with clear criteria is exactly what interviewers want to hear.
5 / 5
The interviewer asks: "How do you handle authentication in Playwright tests without logging in for every test?"
Option C demonstrates production-level thinking: storageState for reuse, multiple state files for multiple roles, and route interception for OAuth flows. This shows experience with real authentication complexity, not just the basic login form scenario.