I just want to disable Chrome notifications in the Chrome opened by a Selenium Java application. (using java code)
Notifications like this one:
The
This question was answered in the: "chromedriver-users" google forum. This is the working answer:
Map prefs = new HashMap();
prefs.put("profile.default_content_setting_values.notifications", 2);
ChromeOptions options = new ChromeOptions();
options.setExperimentalOption("prefs", prefs);
WebDriver driver = new ChromeDriver(options);