I have verified on my windows that I have Powershell - the latest version installed.
When I run the command from the Playwright website :
pwsh bin/Debug/netX/playwright.ps1 install
I get the following error : 'argument bin/Debug/netX/playwright.ps1' is not recognized as the name of a script file. and I have been unable to find a work around. *
*to add more the error
There is an existing GitHub issue regarding this problem. To summarize the solutions listed there, here are a few things you can try:
Install the PowerShell tool:
dotnet tool install --global PowerShell
Or, Update the PowerShell tool:
dotnet tool update --global PowerShell
Or, Install PowerShell Core from the Microsoft website
Then, you can try to install playwright CLI and the browsers.
dotnet tool install --global Microsoft.Playwright.CLI
playwright install
If none if these solves your problem, kindly share in the comments.
I have the same issue then i fixed it by changing the command to pwsh bin/Debug/net7.0/playwright.ps1 install
pwsh is the powershell bin/Debug/net7.0/playwright.ps1 is the file path of that PowerShell script
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With