Reputation: 3268
Due to our app running on Node version < 6.9, I was a little behind on the curve for upgrading to Protractor v5+
and also upgrading to chromedriver 2.28
. Once I did that, I noticed a few changes that I did not want in my tests.
The first issue is a popup displaying
Chrome is now being controlled by automated software
Apart from the fact that I don't want to look at this, I'm afraid there's a possibility it might interfere with page interactions (i.e. clicking a link in the navbar).
The second issue is the password manager started showing up every time my tests logged in, resulting in the popup
Do you want Google Chrome to save your password for this site?
How do I prevent this from happening?
Upvotes: 2
Views: 2160
Reputation: 3268
This was quite a simple solution, though it took some time to figure out (I never know whether to start with digging into Protractor or the drivers). For Protractor, these can be altered via the config file:
capabilities: {
browserName: 'chrome',
chromeOptions: {
// disable "chrome is being controlled by automated software"
'args': ['disable-infobars=true'],
// disable Password manager popup
'prefs': {
'credentials_enable_service': false
}
}
},
You can find a complete list of all the options you can pass to chromedriver
, on Google's chromedriver page.
As a side note, it's always a good practice to make sure you have compatible browser/driver versions when upgrading something. The Protractor team is always good at providing this information in the Protractor Change Log, and it's also included in the chromedriver release notes.
Upvotes: 9