I need to download a zip file on Firefox with protractor. On clicking on download link, Windows dialog asking to Open/Save the file pops up. So How can I handle that. What args do I need to pass to driver? With chrome I can do that with download: { 'prompt_for_download': false },
but what should i do with firefox.
The problem is - you cannot manipulate that "Save As..." dialog via protractor/selenium. You should avoid it being opened in the first place and let firefox automatically download the files of a specified mime-type(s) - in your case
application/zip
.In other words, you need to fire up Firefox with a custom Firefox Profile setting the appropriate preferences:
Here we are basically saying: Firefox, please download zip files automatically, without asking into the
/path/to/save/downloads
directory.