i m navigating a website where i have a situation that when I m clicking on a button it should download the pdf....
I am using the latest version of chrome 60, selenium 3.4, chromedriver.
HashMap<String, Object> chromePrefs = new HashMap<String, Object>();
chromePrefs.put("plugins.plugins_disabled", new String[] {"Chrome PDF Viewer"});
chromePrefs.put("profile.default_content_settings.popups", 0);
ChromeOptions options = new ChromeOptions();
options.setExperimentalOption("prefs", chromePrefs);
DesiredCapabilities cap = DesiredCapabilities.chrome();
cap.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
cap.setCapability(ChromeOptions.CAPABILITY, options);
WebDriver driver = new ChromeDriver(cap);
I have also used the above code, but it doesn't work.