Reputation: 159
To set user profile to Selenium Drivers, we use capabilities.
HashMap<String, Object> chromePrefs = new HashMap<String, Object>();
chromePrefs.put("profile.default_content_settings.popups", 0);
chromePrefs.put("download.default_directory", downloadFilepath);
co.setExperimentalOption("prefs", chromePrefs);
Where can we find the names of these preferences i.e., profile.default_content_settings.popups, download.default_directory
?
Upvotes: 0
Views: 912
Reputation: 50919
You can find it in chromium.googlesource
download.default_directory
will look like
const char kDownloadDefaultDirectory[] = "download.default_directory";
Upvotes: 2