Forrest logo
back to the npx tool

playwright:warp:43f95

Run Playwright test in a specific browser
$ npx playwright test --browser=${browser}
try on your machine

The command npx playwright test --browser=${browser} is used to run tests using the Playwright test runner with a specific browser.

Here's a breakdown of the command:

  • npx is a tool that allows you to run npm packages without having to install them globally.
  • playwright test is the command to run tests using the Playwright test runner.
  • --browser=${browser} is an option that specifies the browser to use for running the tests. The ${browser} is a placeholder that should be replaced with the desired browser name. For example, you could replace ${browser} with chromium, firefox, or webkit to run tests in the respective browsers.

So by running this command and replacing ${browser} with a valid browser name, you can execute your tests using the Playwright test runner with that specific browser.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the npx tool