Explain the difference between Playwright, Selenium, and Cypress, and when you would choose each.
- framework comparison
- playwright
- selenium
- cypress
Answer it first, then compare. Nothing here is saved or scored.
Model answer
Playwright: modern, fast, multi-browser (Chrome, Firefox, WebKit), auto-waits, built-in API testing, great for new projects. Selenium: mature, widest browser support, largest community, best for legacy projects or when you need Java/.NET support. Cypress: developer-friendly, great DX, real-time reloading, but Chrome/Firefox only, no multi-tab support. Choose Playwright for new projects, Selenium for enterprises with existing investment, Cypress when developers will own the tests.
What interviewers listen for
- Test architecture instinctsYou can defend why your suite is shaped like a pyramid, a trophy, or a honeycomb.
- Locator disciplineYou rank selector strategies by stability and explain when to break the rule.
- Flaky test ownershipYou debug to a structural fix instead of retry-until-green.
- Parallelisation literacyYou know how your framework isolates state, fixtures, and database access across workers.