What is the method to disable this pop-up:
Do you want Google Chrome to save your password for this site?
How to do this with Selenium Webdriver (Java)?
What is the method to disable this pop-up:
Do you want Google Chrome to save your password for this site?
How to do this with Selenium Webdriver (Java)?
See the answer to "ChromeDriver user preferences ignored"
cOpt.AddUserProfilePreference("credentials_enable_service", false);
cOpt.AddUserProfilePreference("profile.password_manager_enabled", false);
In Java:
ChromeOptions options = new ChromeOptions();
options.addArguments("--start-maximized");
options.addArguments("--disable-web-security");
options.addArguments("--no-proxy-server");
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);
What Flavio Barisi said, with the addition of the capabilities you pass to your driver.
ChromeOptions options = new ChromeOptions();
options.addArguments("--start-maximized");
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);
DesiredCapabilities capabilities = DesiredCapabilities.chrome();
capabilities.setCapability(ChromeOptions.CAPABILITY, options);
driver = new ChromeDriver(capabilities);
WebDriver cannot interact with browser and/or OS specific dialogs. You can make the following changes manually in the browser to disable the dialogue.
Choose the Settings menu option
Click the Show advanced settings… (at the bottom of the page)
In the “Passwords and forms” section, disable the Manage passwords tickbox.
This works good with latest ChromeDriver:
_chrome.AddUserProfilePreference("credentials_enable_service", false);
In Ruby:
Capybara.register_driver :selenium do |app|
preferences = {credentials_enable_service: false,
password_manager_enabled: false}
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome
capabilities['chromeOptions'] = {'prefs' => preferences}
Capybara::Selenium::Driver.new(app, browser: :chrome,
desired_capabilities: capabilities)
end
In JavaScript;
import webdriver from 'selenium-webdriver';
import chrome from 'selenium-webdriver/chrome';
...
const driver = new webdriver
.Builder()
.usingServer(url)
.forBrowser('chrome')
.setChromeOptions(new chrome.Options().setUserPreferences({
"credentials_enable_service": false,
"profile.password_manager_enabled": false
}))
.build();