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').
This commit is contained in:
parent
baadcd48df
commit
8476bed36e
1 changed files with 2 additions and 2 deletions
|
@ -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')
|
||||
|
|
Loading…
Reference in a new issue