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, please leave comments if anything needs to be added or updated, discuss your queries on our facebook:qavalidation.com, 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: