exec: "google-chrome": executable file not found in %PATH%

環境

系統:Windows10

語言:Golang 1.10

組件相關:Chromedp 0.4

錯誤信息:

API server listening at: 127.0.0.1:13308
exec: "google-chrome": executable file not found in %PATH%

原因分析:

默認路徑未找到chrome程序,導致啓動無頭瀏覽器報錯
解決辦法:

chromedp.ExecPath("C:\\Users\\**\\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe")

替換上邊的chrome路徑爲自己的。

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章