Matmen Matmen - 10 months ago 66
Java Question

How to set Mozilla Firefox to doesn't open manager download with .iso file?

I have a problem while using the framework Vaadin test bench and Selenium libraries.
For my test i need to say to Mozilla Firefox browser 31.0 version to not open the download manager dialog when i try to download .iso files.
I want that the download start by itself in the path that i had setting.
An example of my JAVA code, i'm using jdk 1.8 on apache tomcat 1.8 and my OS is Windows 8:

public static RemoteWebDriver getFirefoxDriver(String pathDownloadFile) {
final FirefoxProfile firefoxProfile = new FirefoxProfile();
final DesiredCapabilities capability = new DesiredCapabilities();
firefoxProfile.setPreference("", pathDownloadFile);
firefoxProfile.setPreference("", false);
firefoxProfile.setPreference("", 2);
firefoxProfile.setPreference("", pathDownloadFile);
firefoxProfile.setPreference("pdfjs.disabled", true);
firefoxProfile.setPreference("plugin.scan.plid.all", false);
firefoxProfile.setPreference("plugin.scan.Acrobat", "99.0");
+ "application/x-pdf,application/pkcs7-mime,application/x-pkcs7-mime,application/pkcs7-signature,text/plain,"
+ "application/iso-image");
firefoxProfile.setPreference("browser.helperApps.alwaysAsk.force", false);
capability.setCapability(FirefoxDriver.PROFILE, firefoxProfile);
WebDriver driver = new RemoteWebDriver(testingbotdotcom, capability);
return driver;


That are the settings of the firefox profile. I supposed that the problem is in mime-type but in every forum i read that the mime-type for .iso files are application/iso-image or application/octet-stream but it doesn't work.

Thanks to all for the answer.


you can determine the mimetype using the following curl command on linux

curl -I "" | grep "Content-Type"

which returns

Content-Type: application/x-iso9660-image