Hi Ashish,
I have tried to download PDF with the following code.
FirefoxProfile profile = new FirefoxProfile();
profile.setPreference("browser.download.folderList", 2);
profile.setPreference("browser.download.dir","C:\\workspace\\downloads");
profile.setPreference("browser.helperApps.neverAsk.saveToDisk", "application/msword,application/x-rar-compressed,application/octet-stream,application/csv,text/csv,application/xml,application/pdfss,application/x-pdf,application/acrobat,applications/vnd.pdf,text/pdf,text/x-pdf,application/pdf,application/octet-stream,application/application/pdf");
WebDriver driver = new FirefoxDriver(profile);
driver.get("https://thegazette.co.uk/");
driver.manage().window().maximize();
but still get the save to disk pop up and need to manually click on the ok button to download file.
Can you please help.
Regards
Shashikant