asked this question earlier, but now i will ask again with bit more explanation of what i did, I could not get it worked please help me out.
I am trying to download a file which is having a .exe extension but it is actually showing as a binary file (MIME type is application/octet-stream ) when i checked the GET request from the server, and i wrote the below code for setting up the firefox preferences which included binary file too.
firefoxProfile.setPreference("browser.download.folderList", 2); firefoxProfile.setPreference("browser.helperApps.neverAsksaveToDisk", "application/x-msexcel,text/html,application/xop+xml,application/vnd.ms-excel.sheet.binary.macroenabled.12,application/vnd.wap.wbxml,application/octet-stream,application/x-authorware-bin,application/x-bcpio,text/plain,application/x-msdownload,application/excel,application/x-excel,application/excel,application/x-excel,application/excel,application/vnd.ms-excel,application/x-excel,application/x-msexcel"); firefoxProfile.setPreference("browser.download.manager.showWhenStarting", false); firefoxProfile.setPreference("browser.download.dir", "C:\\Users\\Downloads"); firefoxProfile.setPreference("browser.privatebrowsing.autostart", true); GlobalVariables.BrowserDriver = new FirefoxDriver(firefoxProfile);
when i click the link for downloading, it is still asking for the save message, and the confusing part is at this stage i opened another tab in firefox and checked the preferences and its all set as false. that means the code part is working to set up preferences but save pop up message is still coming, i have no idea what is the problem here. If someone knows please guide me,