I am trying to download an XML file from Firefox and Webdriver, but I can't handle the download pop-up. This issue comes only for downloading the XML files.

When clicking the button, I need the file to download automatically, without a pop-up.

Here is my code:

enter image description here

Popup Window:

enter image description here

Mime Type:

enter image description here

Can anyone help me out with this issue??

1 Answer 1


What version of Firefox running tests with?

There was an issue around a year ago which affected a lot of us just for the download of the xml files, where the download save to disk box always appeared.

This was resolved by Mozilla for browser version v.85.0.2 onward. See issue thread here: browser.helperApps.neverAsk.saveToDisk is ignored (still get prompted) when downloading files for which we offer to "open in firefox"

If you do not need the file opened in the browser either, you could add the following as well:

profile.set_preference("browser.helperApps.neverAsk.openFile", "video/mpeg, application/xml, ......");

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.