Playwright Automation Engineer Interview Questions & Answers
40 questions for Playwright Automation Engineer interviews — 4 easy, 34 medium, 2 hard.
About the Playwright Automation Engineer role
Builds and maintains end-to-end test suites in Playwright with TypeScript or JavaScript. Writes stable tests for web journeys, creates page objects and fixtures, mocks APIs for edge cases and keeps the suite green in CI. Interviews test locator choice, auto-waiting, fixtures, API helpers, debugging with traces and short live coding tasks such as automating a login or checkout flow, plus questions on keeping the suite fast.
A third-party analytics script makes tests slow and flaky. What do you do?
Show answer
How do you mock one GraphQL query when all calls go to /graphql?
Show answer
Write a custom fixture that gives a logged-in page.
Show answer
Tell me about a time you reduced pipeline time with parallel runs or sharding.
Show answer
What does test.describe do?
Show answer
How do you handle a page that opens a browser permission prompt for notifications?
Show answer
What is the difference between page.route and context.route?
Show answer
How do you provide page objects as fixtures?
Show answer
How does expect.poll work and when would you use it?
Show answer
How do you use keyboard shortcuts in Playwright?
Show answer
How do you test a page in dark mode or with reduced motion?
Show answer
What is the difference between page, context and browser?
Show answer
What is expect(...).toPass and how is it different from expect.poll?
Show answer
How do you assert an element's CSS class, attribute or value?
Show answer
Why choose Playwright over Selenium?
Show answer
How does Playwright talk to browsers, and why does that make it less flaky?
Show answer
How do you test accessibility with Playwright?
Show answer
How do you test geolocation, permissions and time zones?
Show answer
Tell me about a time mocking helped you test a hard edge case.
Show answer
How do you do visual regression testing?
Show answer
What are web-first assertions?
Show answer
Describe a time you convinced developers to add accessible labels or test ids.
Show answer
Which locators does Playwright recommend?
Show answer
How do you simulate a slow API to test a loading spinner?
Show answer
How do you test file downloads and verify their content?
Show answer
What is the Clock API in Playwright?
Show answer
What is the difference between test-scoped and worker-scoped fixtures?
Show answer
A beforeAll creates one user and tests in the same file fail randomly in parallel mode. Why?
Show answer
What is the difference between click and dispatchEvent?
Show answer
How does URL matching work in page.route?
Show answer
How do you assert that a request was sent with the correct payload?
Show answer
How do you handle multiple tabs or pop-ups?
Show answer
How do you locate elements inside a specific row or card?
Show answer
How do you filter a list of locators by text or by a child element?
Show answer
Tell me about a time you explained a failing test report to a non-technical stakeholder.
Show answer
How do you test API error scenarios?
Show answer
What are global setup and teardown?
Show answer
How do you handle authentication to avoid logging in every test?
Show answer
How do you select an option from a native select dropdown?
Show answer
Frequently asked questions
What does a Playwright Automation Engineer do?
Builds and maintains end-to-end test suites in Playwright with TypeScript or JavaScript. Writes stable tests for web journeys, creates page objects and fixtures, mocks APIs for edge cases and keeps the suite green in CI. Interviews test locator choice, auto-waiting, fixtures, API helpers, debugging with traces and short live coding tasks such as automating a login or checkout flow, plus questions on keeping the suite fast.
Which skills are tested in a Playwright Automation Engineer interview?
Expect questions on Playwright Test runner, TypeScript, Role-based locators, Custom fixtures, Trace debugging. Most rounds also ask you to explain a project and solve one practical problem live.
How do I prepare for a Playwright Automation Engineer interview?
Revise Playwright Core, Locators and Assertions, Fixtures and Hooks, Network Mocking first using the topic sheets, practise the questions on this page aloud, then do one full mock interview to practise timing.