|
Post by leiwang on Oct 9, 2019 6:53:20 GMT
I found the solution on web as below: ChromeOptions options = new ChromeOptions(); Map<String, Object> prefs = new HashMap<String, Object>(); prefs.put(" credentials_enable_service", false); prefs.put(" profile.password_manager_enabled", false); options. setExperimentalOption("prefs", prefs); In seleniumplus, we should set the experimental options when starting the browser. - Firstly, create a chrome experimental option file (such as "c:\experimentalOptions.dat") containing
{
"prefs" : {
"credentials_enable_service" : false,
"profile" : { "password_manager_enabled" : false }
}
}
- Then, start browser as below:
String optionsFile = "c:\\experimentalOptions.dat";
StartWebBrowser(URL, ID, SelectBrowser.BROWSER_NAME_CHROME, "30", "true", quote(SelectBrowser.KEY_CHROME_EXPERIMENTAL_OPTIONS), optionsFile);
|
|