Playwright · Junior · Question 1 of 75

Which command creates a new Playwright Test project with a config and an example test?

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.

Further reading

Problem with a question

Playwright · Junior · question 1

Test yourself

Take the Playwright · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz