Rayrun
← Back to Discord Forum

Download new browsers command

Hi all,

I recently updated Playwright on a project I'm working on and got this message when I ran my tests. I have Powershell installed and tried running that command in package manager console in VS, but I keep getting this errror message:

The argument 'bin/Debug/net7.0/playwright.ps1' is not recognized as the name of a script file. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Does anyone know a workaround for this? Thanks!

image.png

This thread is trying to answer question "How can I resolve the error message 'bin/Debug/net7.0/playwright.ps1' is not recognized when running a command in the package manager console in Visual Studio after updating Playwright?"

0 replies

Answer

Resolving Playwright Error in Visual Studio

You're seeing the error "'bin\debug\net7.0\playwright.ps1' is not recognized" because Visual Studio can't find the Playwright script. Here's how you can fix it:

Update Playwright

First, ensure Playwright is up-to-date. Run npm update playwright or yarn upgrade playwright in your project's root directory.

npm update playwright

or

yarn upgrade playwright

Check Environment Variables

Next, verify the path to Playwright binaries in your environment variables. Open your system's Environment Variables settings. Check if PLAYWRIGHT_BROWSERS_PATH points to the location of Playwright binaries. On Windows, it's usually %USERPROFILE%\AppData\Local\ms-playwright.

Customize Binary Location

If you've customized the location where Playwright downloads browser binaries, update both installation and runtime paths.

Restart Visual Studio

Restart Visual Studio after making changes to environment variables or paths.

Reinstall Playwright

If the error persists, uninstall and reinstall Playwright. Run npx playwright uninstall --all to uninstall, then npm install playwright or yarn add playwright to reinstall.

npx playwright uninstall --all
npm install playwright

or

npx playwright uninstall --all
yarn add playwright

Rebuild Your Project

Finally, rebuild your project before running any Playwright commands.

If you're still having trouble, check out the Playwright documentation or the Playwright community for more help.

TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email luc@ray.run.