I'm using Selenium webdriver 3.3 and ChromeDriver 2.28 (32bit). My slave machine is Windows 7 running Chrome 57.
When Chrome starts I am trying to use ChromeOptions over RemoteWebDriver to disable the "save your password" pop-up using the parameter "password_manager_enabled".
However, it seems to have no effect at all. I have tried many variations around ChromeOptions, JSON strings and simple strings but all to no avail.
ChromeOptions cOpt = new ChromeOptions();
cOpt.addUserProfilePreference("profile.password_manager_enabled", false);
var capabilities = chromeOpts.ToCapabilities() as DesiredCapabilities;
// Add OS, Platform capabilities etc
string gridConnectionURL = "xxxx"
driver = new CustomRemoteDriver(new Uri(gridConnectionURL), capabilities, new TimeSpan(0, 5, 0));
Does anyone know the "correct" way to set this preference so it works?
You just need to replace
//cOpt.AddUserProfilePreference("password_manager_enabled", "false");
cOpt.AddUserProfilePreference("credentials_enable_service", false);
cOpt.AddUserProfilePreference("profile.password_manager_enabled", false);
来源:https://stackoverflow.com/questions/42793277/chromedriver-user-preferences-ignored