Playwright · Junior · Question 1 of 75
Which command creates a new Playwright Test project with a config and an example test?
- 1
npx playwright install-project - 2
npm create test --playwright - 3
npm init playwright@latest
Show the answer
Correct answer: npm init playwright@latest
Explanation
The init command asks a few questions (TypeScript or JavaScript, test folder, GitHub Actions workflow), installs @playwright/test and browsers, and creates playwright.config.ts with an example test.