Testing / Playwright Interview questions
How do you install Playwright?
The fastest path is the official scaffolding command, which sets up a ready-to-run project in one step:
npm init playwright@latest
This installs @playwright/test, downloads the Chromium, Firefox, and WebKit browser binaries, and generates a playwright.config.ts, a sample test, and an optional GitHub Actions workflow.
To add Playwright to an existing project instead, install the package and fetch the browsers separately:
npm install -D @playwright/test npx playwright install
The second command is easy to forget but essential - without it, tests fail immediately because no browser binaries exist locally yet.
More Related questions...