Merge pull request #796 from lucas-clemente/chrome-exec-path

try to find the Chrome executable in different paths
This commit is contained in:
Marten Seemann
2017-08-23 17:43:25 +07:00
committed by GitHub

View File

@@ -102,7 +102,14 @@ func getChromePath() string {
if runtime.GOOS == "darwin" {
return "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
}
return "google-chrome"
if path, err := exec.LookPath("google-chrome"); err == nil {
return path
}
if path, err := exec.LookPath("chromium-browser"); err == nil {
return path
}
Fail("No Chrome executable found.")
return ""
}
func chromeTest(version protocol.VersionNumber, url string, blockUntilDone func()) {