Disable Chrome driver "save your password" popup

844 views
Skip to first unread message

Reuven Volnoboy

unread,
Mar 23, 2017, 10:08:18 AM3/23/17
to Serenity BDD Users Group
In Chrome driver 2.28  two annoying things started to appear:

1. “Chrome is being controlled by automated test software” infobar -  to fix it I have added 

chrome.switches=--disable-infobars; 

to serenity.properties file.

2. "Do you want to save your password.." popup. To hide this one I didn't find a solution yet.

I have tried:

1. chrome.switches=--disable-save-password-bubble;  It just didn't help.


2. chrome.switches=--incognito; Probably this one would work, but for some reason because of this flag all my tests immediately failing. 


On forums people recommend to do this:

  ChromeOptions options = new ChromeOptions();
options.AddUserProfilePreference("credentials_enable_service", false);
options.AddUserProfilePreference("password_manager_enabled", false);
ChromeDriver driver = new ChromeDriver(options);

The problem is I cannot understand how to add it in Serenity.

Any ideas to solve this issue?

Reuven Volnoboy

unread,
Mar 23, 2017, 10:25:09 AM3/23/17
to Serenity BDD Users Group
The reason why chrome.switches=--incognito; isn't working:

Screenshots rely on the automation extension, and the automation extension is not enabled in incognito mode.

Exception:
net.serenitybdd.core.exceptions.SerenityManagedException: unknown error: No current window
JavaScript stack:
Error: No current window
    at checkForExtensionError (chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/background.js:14:17)
    at Object.callback (chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/background.js:67:5)
    at safeCallbackApply (extensions::sendRequest:21:15)
    at handleResponse (extensions::sendRequest:74:7)

80Vikram

unread,
Apr 28, 2017, 10:37:20 AM4/28/17
to Serenity BDD Users Group
Hi Reuven,

Did you get it working ? I do have similar requirements as well, where I need to use

chromeOptions.addArguments("--kiosk");

Thanks,

Vikram

Reply all
Reply to author
Forward
0 new messages