Skip to content

Commit aad9733

Browse files
authored
Merge pull request #434 from AutomationSolutionz/firefox-download-folder
[FIX] Use zeuz download folder in Firefox to download files
2 parents d99f9da + c810d28 commit aad9733

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Framework/Built_In_Automation/Web/Selenium/BuiltInFunctions.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -843,6 +843,13 @@ def firefoxheadless():
843843
apps = "application/pdf;text/plain;application/text;text/xml;application/xml;application/xlsx;application/csv;application/zip"
844844
profile.set_preference("browser.helperApps.neverAsk.saveToDisk", apps)
845845
profile.accept_untrusted_certs = True
846+
847+
options.set_preference("browser.download.folderList", 2)
848+
options.set_preference("browser.download.manager.showWhenStarting", False)
849+
options.set_preference("browser.download.dir", download_dir)
850+
options.set_preference("browser.helperApps.neverAsk.saveToDisk", apps)
851+
options.accept_untrusted_certs = True
852+
846853
if(remote_host):
847854
capabilities = webdriver.DesiredCapabilities().FIREFOX
848855
capabilities['acceptSslCerts'] = True

0 commit comments

Comments
 (0)