Playwright · Junior · Question 6 of 75

How do you run only tests whose title contains "login"?

Show the answer

Correct answer: npx playwright test -g "login"

Explanation

-g (or --grep) filters tests by a regular expression on the title. You can also pass a file path or a file:line to run a specific test.

Further reading

Problem with a question

Playwright · Junior · question 6

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