Reliable end-to-end tests

Playwright Interview Questions

Locators, auto-waiting, fixtures, network control and CI. Building browser tests that fail for real reasons.

Quiz me
40 questions10 easy22 medium8 hard0/40 learned
01What is Playwright and what problem does it solve?Easyplaywright · e2e testing · browser automation02How does Playwright differ from Selenium?Mediumplaywright · selenium · test automation03How is Playwright architected?Hardarchitecture · browser context · playwright internals04How do you set up a Playwright project?Mediumsetup · playwright config · typescript05What does a first Playwright test look like?Easytesting · test runner · locators06What is a locator and why is it better than a raw selector?Easylocators · selectors · auto-waiting07Why prefer getByRole and other user-facing locators?Mediumlocators · accessibility · role selectors08How does Playwright auto-waiting work?Mediumauto-waiting · actionability · flakiness09How do Playwright assertions differ from plain Jest assertions?Easyassertions · expect · web-first10When should you use expect.poll?Mediumexpect.poll · assertions · async state11What are fixtures and how do you build a custom one?Hardfixtures · test.extend · setup teardown12Should you use the Page Object Model in Playwright?Mediumpage object model · test design · maintainability13How do you test an authenticated app without logging in every test?Hardauthentication · storage state · setup project14What is storage state and what does it capture?Mediumstorage state · cookies · localstorage15What is a browser context?Easybrowser context · isolation · fixtures16How do you handle multiple pages, tabs and popups?Mediumpages · popups · tabs17How does network interception work with page.route?Hardpage.route · network · interception18How do you write API tests in Playwright?Mediumapi testing · request fixture · http19How do you mock an API response in a Playwright test?Mediummocking · network · test data20How do you upload a file in Playwright?Easyfile upload · input · filechooser21How do you test file downloads?Easydownloads · files · artifacts22How do you interact with iframes?Mediumiframes · frame locator · nested frames23How do you handle alerts, confirms and prompts?Easydialogs · alerts · prompts24How do you simulate keyboard and mouse input?Mediumkeyboard · mouse · input25What is a Playwright trace and how do you use it?Mediumtracing · debugging · trace viewer26How do you capture screenshots and videos?Easyscreenshots · video · artifacts27How do you debug a failing Playwright test?Mediumdebugging · inspector · trace viewer28What is Playwright codegen and when should you use it?Easycodegen · recording · locators29How does Playwright isolate tests and where does isolation break?Hardtest isolation · contexts · shared state30How does parallelization work in Playwright?Hardparallelism · workers · test runner31Should you use retries, and how do they work?Mediumretries · flaky tests · ci32How do you diagnose and fix a flaky test?Hardflaky tests · debugging · determinism33How does visual testing work with toHaveScreenshot?Mediumvisual testing · screenshots · baselines34How do you test accessibility in Playwright?Mediumaccessibility · axe · aria35Can Playwright test components in isolation?Hardcomponent testing · react · mount36How do you run Playwright reliably in CI?Mediumci · github actions · artifacts37How does test sharding work?Mediumsharding · ci · parallelism38How do you emulate a mobile device?Mediummobile emulation · devices · viewport39How do you run tests across Chromium, Firefox and WebKit?Mediumcross-browser · projects · webkit40What are the most important Playwright best practices?Mediumbest practices · test design · maintainability

Reading is step one

Now say it out loud.

Understanding an answer and delivering it under pressure are different skills. Rehearse this topic in a live Playwright mock interview and get scored feedback on depth, clarity and confidence.