Docker-selenium: Any reason why 'goog:chromeOptions' works but 'chromeOptions' does not?

Created on 14 Feb 2018  Â·  4Comments  Â·  Source: SeleniumHQ/docker-selenium

Meta -

Image(s):

selenium/hub:3.9.1-actinium
selenium/node-chrome:3.9.1-actinium
Docker-Selenium Image Version(s):

Docker Version:
17.12.0-ce-mac49

OS:

Mac: 10.13.1

Expected Behavior -

when passed in chromeOptions, I expect my test to run in that environment set by the chromeOptions

Actual Behavior -

It loads up the chrome browser without the options, but if the label is changed to 'goog:chromeOptions' it will work

I know it's not the biggest of deals, was just wondering if this was a change to selenium that hasn't been documented yet, or if this is an unintended behavior (or if its just me)

Most helpful comment

The key was changed in chromedriver in version 2.31

https://chromedriver.storage.googleapis.com/2.31/notes.txt

It used to be backward compatible, so the chromedriver team may have removed that compatibility recently.

All 4 comments

The key was changed in chromedriver in version 2.31

https://chromedriver.storage.googleapis.com/2.31/notes.txt

It used to be backward compatible, so the chromedriver team may have removed that compatibility recently.

This goes along with the W3C specification for Protocol Extensions

Excerpt:

Remote ends may also introduce extension capabilities that are extra capabilities used to provide configuration or fulfill other vendor-specific needs. Extension capabilities’ key must contain a ":" (colon) character, denoting an implementation specific namespace. The value can be arbitrary JSON types.

As with extension commands, it is suggested that the key used to denote the extension capability namespace is based on the vendor keywords listed in [CSS21] and precedes the first ":" character in the string.

how do i add goog:chrome options to my java code so selenium grid takes it. The below code only works locally in a docker container and I need it to work in the grid. it seems that the grid does not know how to handle ChromeOptions.

ChromeOptions options = new ChromeOptions(); options.addArguments("--start-maximized"); options.addArguments("--disable-infobars"); options.addArguments("--proxy-pac-url= http://ProxyPacURL.com"); DesiredCapabilities dc = DesiredCapabilities.chrome(); dc.setCapability(ChromeOptions.CAPABILITY, options); driver = new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"), dc);

@ebennett98 the Grid knows how to handle it, you just need to check that your Java bindings version is fairly recent.

Was this page helpful?
0 / 5 - 0 ratings