3

I just rebuilt our development environment. This forced the latest version of chrome and suddenly the protractor based tests stopped working. After some research, I tracked this down to the fact that our chrome options in the protractor configuration file are now ignored.

Here is the configuration that used to work fine before:

exports.config = {
    ...
    multiCapabilities     : [
      {
        browserName: "chrome",
        chromeOptions: {
          args: [  
             "--disable-gpu",
             "--headless", 
             '--no-sandbox',
             "--incognito" 
         ]
          }
        },
      },
    ],
    ...
};


                     Before           After
protractor           6.0.0            6.0.0
selenium             4.0.0-alpha-1    4.0.0-alpha-1
chrome               74.0.3729.157    76.0.3809.100
chromedriver         74.0.3729.6      76.0.3809.68
gae123
  • 8,589
  • 3
  • 35
  • 40

2 Answers2

4

In recent versions of selenium you have to specify the chrome options as goog:chromeOptions. So just change the chromeOptions line above to the following:

...
       "goog:chromeOptions": {
...

and you are back in business.

gae123
  • 8,589
  • 3
  • 35
  • 40
2
"chromeOptions": {}

its still usable in most cases, but does not support new arguments provided by chrome

suggested to use

"goog:chromeOptions": {}

Ref to doc: http://chromedriver.chromium.org/capabilities

Same rule for firefox

"moz:firefoxOptions": {}

Ref to doc: https://developer.mozilla.org/en-US/docs/Web/WebDriver/Capabilities/firefoxOptions

Infern0
  • 2,565
  • 1
  • 8
  • 21
  • I really do not see much difference between your answer and mine, you should consider editing mine instead, if you wanted to add the link. – gae123 Aug 10 '19 at 18:35