Chandresh Parmar :
I am facing an issue while downloading JAR file using Selenium WebDriver chrome. Below are the codes I have tried found from different threads available on stackoverflow and none of them worked.
Example 1 -
ChromeOptions options = new ChromeOptions();
Map<String, Object> prefs = new HashMap<String, Object>();
prefs.put("safebrowsing.enabled", "true");
options.setExperimentalOption("prefs", prefs);
options.addArguments("--safebrowsing-disable-download-protection");
options.addArguments("--safebrowsing-disable-extension-blacklist");
WebDriver driver = new ChromeDriver(options);
Example 2 -
HashMap<String, Object> chromePrefs = new HashMap<String, Object>();
chromePrefs.put("profile.default_content_settings.popups", 0);
chromePrefs.put("safebrowsing.enabled", "true");
ChromeOptions options = new ChromeOptions();
options.setExperimentalOption("prefs", chromePrefs);
DesiredCapabilities cap = new DesiredCapabilities();
cap.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
cap.setCapability(ChromeOptions.CAPABILITY, options);
WebDriver driver = new ChromeDriver(options);
I am using ChromeDriver 76.0.3809.126 on Windows 10.
Is there any change in latest chromedriver or am I missing something here?
Matrix4290 :
Chrome doesn't allow jar downloads. Use another webdriver.