From 05d957379c2178d061bb85d4798af628e37a0c06 Mon Sep 17 00:00:00 2001 From: Sam Maister Date: Mon, 8 Apr 2024 15:48:53 +0100 Subject: [PATCH] docs: specify user CD management for older Electron versions --- .../chromedriver-configuration.md | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/docs/configuration/chromedriver-configuration.md b/docs/configuration/chromedriver-configuration.md index e1a8a957..02b80d1c 100644 --- a/docs/configuration/chromedriver-configuration.md +++ b/docs/configuration/chromedriver-configuration.md @@ -24,4 +24,28 @@ export const config = { ## User Managed -If you prefer to manage Chromedriver yourself you can install it directly or via some other means like [`electron-chromedriver`](https://github.com/electron/chromedriver), in this case you will need to tell WebdriverIO where your Chromedriver binary is through its custom [`wdio:chromedriverOptions`](https://webdriver.io/docs/capabilities#webdriverio-capabilities-to-manage-browser-driver-options) capability. +**If your app uses a version of Electron which is lower than v26 then you will need to manually configure Chromedriver.** + +This is because WDIO uses Chrome for Testing to download Chromedriver, which only provides Chromedriver versions of v115 or newer. + +In order to manage Chromedriver yourself you can install it directly or via some other means like [`electron-chromedriver`](https://github.com/electron/chromedriver), in this case you will need to tell WebdriverIO where your Chromedriver binary is through its custom [`wdio:chromedriverOptions`](https://webdriver.io/docs/capabilities#webdriverio-capabilities-to-manage-browser-driver-options) capability. + +For example, in order to use WDIO with an Electron v19 app, you will have to download Chromedriver `102.0.5005.61` from https://chromedriver.chromium.org/downloads. You should then specify the binary path in the WDIO config as follows: + +_`wdio.conf.ts`_ + +```ts +export const config = { + // ... + services: ['electron'], + capabilities: [ + { + 'browserName': 'electron', + 'wdio:chromedriverOptions': { + binary: '/Users/wdio/Downloads/chromedriver', // path to Chromedriver you just downloaded + }, + }, + ], + // ... +}; +```