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,010 points
96 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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,590 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,050 points
258 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,050 points
988 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,050 points
131 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,130 points
519 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,590 points
1,792 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,590 points
387 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.