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 20, 2018 in Selenium by kappa3010
• 2,080 points
459 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 20, 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 29, 2018 in Selenium by nsv999
• 5,510 points
1,113 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 12, 2018 in Selenium by nsv999
• 5,510 points
2,660 views
0 votes
1 answer
0 votes
1 answer

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,510 points
2,568 views
0 votes
1 answer
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,870 points
2,034 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
6,823 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
1,598 views