From dbb368e9a3184cde9c71ffb29e080057e9c63574 Mon Sep 17 00:00:00 2001 From: Nathan Adams Date: Fri, 4 Sep 2020 15:32:57 +0200 Subject: [PATCH] chore: Workaround for chrome not being found on windows tests --- web/packages/selfhosted/wdio.conf.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/web/packages/selfhosted/wdio.conf.js b/web/packages/selfhosted/wdio.conf.js index db92ed319926..971908bd4903 100644 --- a/web/packages/selfhosted/wdio.conf.js +++ b/web/packages/selfhosted/wdio.conf.js @@ -1,3 +1,14 @@ +let chrome_binary = undefined; + +if (process.platform === "win32" && process.env.CI) { + // Chrome 84->85 changed the location where Chrome is installed on Windows. + // ChromeDriver can't find it yet, so we'll manually specify it for GitHub Actions. + // See https://github.com/actions/virtual-environments/issues/1546 + // See https://developercommunity.visualstudio.com/content/problem/1170486/selenium-ui-test-can-no-longer-find-chrome-binary.html#reply-1171966 + chrome_binary = + "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe"; +} + exports.config = { // // ==================== @@ -53,6 +64,7 @@ exports.config = { browserName: "chrome", "goog:chromeOptions": { args: ["--headless", "--disable-gpu"], + binary: chrome_binary, }, // If outputDir is provided WebdriverIO can capture driver session logs // it is possible to configure which logTypes to include/exclude.