Need to control the file download dialog box in Mozilla Firefox

0 votes
Is there an API that will let me control the file download dialog that pops-up in Mozilla Firefox? I also want to know if "privileged mode" is good enough to control the same interface with Chrome?
Apr 21, 2018 in Selenium by kappa3010
• 2,090 points
2,867 views

1 answer to this question.

0 votes

Well for Firefox, there is something called Browser profilling. This helps you pre-control download prompts which pops-up.

The below code can be used to set preferences. 

// To prevent download dialog
profile = webdriver.FirefoxProfile()
profile.set_preference('browser.download.folderList', 2)  // custom location of profile
profile.set_preference('browser.download.manager.showWhenStarting', False)   // Prevents popup
profile.set_preference('browser.download.dir', '/tmp')   // directory to save the downloads
profile.set_preference('browser.helperApps.neverAsk.saveToDisk', 'text/csv')   // for probably saving other logs
answered Apr 21, 2018 by king_kenny
• 3,710 points

Related Questions In Selenium

0 votes
1 answer
0 votes
1 answer

Need to download a file using Selenium

Pretty simple...Find the element or link using ...READ MORE

answered Mar 30, 2018 in Selenium by nsv999
• 5,500 points
3,484 views
0 votes
1 answer

How do i change the location where my file gets downloaded in Selenium Webdriver and firefox driver?

There are a couple of errors there. ...READ MORE

answered Apr 13, 2018 in Selenium by nsv999
• 5,500 points
6,191 views
0 votes
1 answer
0 votes
2 answers

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,500 points
13,674 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
9,143 views
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,910 points
7,221 views
0 votes
1 answer

How to handle the popup of file upload in Windows OS with WebDriver?

The value of name locator has probably ...READ MORE

answered Apr 25, 2018 in Selenium by king_kenny
• 3,710 points
18,527 views
0 votes
1 answer

Need to know the differences between .// and //* in XPath?

The expressions your talking about, select different ...READ MORE

answered Apr 29, 2018 in Selenium by king_kenny
• 3,710 points
6,892 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP