From 8476bed36eb4e7c5c58b50bc6b186fa82263fd21 Mon Sep 17 00:00:00 2001 From: Karel Braeckman Date: Thu, 18 Mar 2021 21:35:04 +0100 Subject: [PATCH] Change example to work with latest versions of selenium-webdriver (#28231) See https://github.com/SeleniumHQ/selenium/issues/9286 The existing snippet works with selenium-webdriver <= 3.6.0, but any more recent version seems to require using 'goog:chromeOptions' and forBrowser('chrome'). --- docs/tutorial/using-selenium-and-webdriver.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/tutorial/using-selenium-and-webdriver.md b/docs/tutorial/using-selenium-and-webdriver.md index 61ff0e1cb409..197c29a5ffcb 100644 --- a/docs/tutorial/using-selenium-and-webdriver.md +++ b/docs/tutorial/using-selenium-and-webdriver.md @@ -86,12 +86,12 @@ const driver = new webdriver.Builder() // The "9515" is the port opened by chrome driver. .usingServer('http://localhost:9515') .withCapabilities({ - chromeOptions: { + 'goog:chromeOptions': { // Here is the path to your Electron binary. binary: '/Path-to-Your-App.app/Contents/MacOS/Electron' } }) - .forBrowser('electron') + .forBrowser('chrome') // note: use .forBrowser('electron') for selenium-webdriver <= 3.6.0 .build() driver.get('http://www.google.com')