Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 99415

How to handle pop up window dialog to download file automatically with firefox profile in python selenium on Linux (Ubuntu) system

$
0
0

I am trying to download the file automatically from system file download dialog by setting preference in firefox profile in my python selenium code , but my code is not working.

Browser : Firefox 72.0 Selenium Version : 3.14 OS : linux Ubuntu Filetype to download: *.enc (encrypted file type) Path of firefox in linux : /usr/bin/firefox

Code :

profile = webdriver.FirefoxProfile()
profile.set_preference("browser.download.folderList", 2)
profile.set_preference("browser.download.manager.showWhenStarting", False)
profile.set_preference("browser.download.dir", "/home/user/Downloads/tests")
profile.set_preference("browser.helperApps.neverAsk.saveToDisk", "application/x-uuencoded,application/octet-stream")
self.driver = webdriver.Firefox(firefox_profile=profile)

Windows download dialog


Viewing all articles
Browse latest Browse all 99415

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>