Web Analytics
Back
Featured image of post Playwright 錯誤 - Unable to Get Local Issuer Certificate

Playwright 錯誤 - Unable to Get Local Issuer Certificate

無法下載瀏覽器資源

問題描述

錯誤訊息:Error: unable to get local issuer certificate 主要造成原因:Corporate firewall and NTLM proxy.

說明:每次執行 PlayWright 時皆會檢查並下載新的瀏覽器資源,但因為公司防火牆政策導致無法下載。

 

 

解決方法

1.在其他電腦安裝 PlayWright,執行 playwright install 指令後,在瀏覽器資料夾找到瀏覽器資源,複製到要執行的電腦。

PlayWright 瀏覽器資料夾預設為 %USERPROFILE%\AppData\Local\ms-playwrigh,以使用者Duran來說,資料夾應該為 C:\Users\Duran\AppData\Local\ms-playwright\,其中 AppData 為隱藏資料夾。

 

2.執行 PlayWright 時不要檢查瀏覽器,在環境變數內設定 PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1,重啟電腦 (如果是 Azure DevOps Agent記得重啟服務即可)

Built with Hugo   Theme Stack designed by Jimmy