Download files in firefox browser using selenium WebDriver

FileDownload_FireFox_SeleniumWe will be using FirefoxProfile class to set certain preferences and download file from mozilla browser to our local hard disk.

Refer setPreferences for firefoxProfile.

Code implementation –


For MIME type or media type, please refer below links –

MIME on wiki

Structured MIME types

Make sure MIME type should match to the file type we are downloading from browser.


Content posted is based on learning or working experience, Share the post with others if find useful, Any queries?, leave comments or discuss on our, Thanks!

1 Response

  1. Manjanna K N says:

    Thank you so much.

    This script is worked for me.

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: