I'm trying to remove the option of where to save a file to download from chrome, and I can't get it with this configuration

Viewed 44

I have used different options, which do work for me with headlessmode enabled, but not inactive.

prefs.put("profile.default_content_settings.popups", 0);
prefs.put("download.default_directory", driverFactory.getDownloadPath());
prefs.put("download.prompt_for_download", false);
prefs.put("download.default_directory", driverFactory.getDownloadPath());

And when setting the download directory by default, it ignores the previous configurations, and the popup keeps popping up, thus failing me the tests that have some implication in downloading some type of file.

0 Answers
Related