PlayWright安装示例 1.Nuget安装Microsoft.Playwright2.下载所需浏览器(1)下载方式1# 不使用代理 powershell -ExecutionPolicy Bypass -File D:\MyProject\change_playwright_version\change_playwright_version\bin\Debug\playwright.ps1 install # 使用代理 (powsershell) $env:HTTPS_PROXYhttp://127.0.0.1:40888; $env:HTTP_PROXYhttp://127.0.0.1:40888; powershell -ExecutionPolicy Bypass -File D:\MyProject\change_playwright_version\change_playwright_version\bin\Debug\playwright.ps1 install # 使用代理 (CMD) set HTTPS_PROXYhttp://127.0.0.1:40888 set HTTP_PROXYhttp://127.0.0.1:40888 powershell -ExecutionPolicy Bypass -File D:\MyProject\change_playwright_version\change_playwright_version\bin\Debug\playwright.ps1 install2下载方式2下载链接https://cdn.playwright.dev/dbazure/download/playwright/builds/{浏览器类型}/{版本号}/firefox-win64.zip 例https://cdn.playwright.dev/dbazure/download/playwright/builds/firefox/1466/firefox-win64.zip自行替换连接中的版本号和浏览器类型版本号类型可在.playwright\package\browsers.json文件中查看3.下载后的浏览器默认路径:C:\Users\Administrator\AppData\Local\ms-playwright拷贝你所需的浏览器到你的工程目录即可