I am trying to run chrome driver without loading any images for obvious reasons.
i found a piece of code online but i think it's outdated
HashMap<String, Object> images = new HashMap<String, Object>();
images.put("images", 2);
HashMap<String, Object> prefs = new HashMap<String, Object>();
prefs.put("profile.default_content_settings", images);
ChromeOptions options =new ChromeOptions();
options.setExperimentalOption("prefs", prefs);
DesiredCapabilities chromeCaps = DesiredCapabilities.chrome();
chromeCaps.setCapability(ChromeOptions.CAPABILITY, options);
driver = new ChromeDriver(chromeCaps);
does not work at all..
any help would be greatly appriciated