From cbc6f644612cb221d5b01069fc8db6d6d790603d Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Wed, 23 Aug 2017 16:43:44 +0700 Subject: [PATCH] try to find the Chrome executable in different paths --- integrationtests/chrome/chrome_suite_test.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/integrationtests/chrome/chrome_suite_test.go b/integrationtests/chrome/chrome_suite_test.go index b88209161..0a7df5a74 100644 --- a/integrationtests/chrome/chrome_suite_test.go +++ b/integrationtests/chrome/chrome_suite_test.go @@ -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()) {