0

I would like to make selenium automatically download .xls file on Ubuntu 20.04 (firefox) without that annoying pop-up. I'm using this setting for .csv file which works

profile = FirefoxProfile()
profile.set_preference("browser.download.panel.shown", False)
profile.set_preference("browser.helperApps.neverAsk.openFile","text/csv,application/vnd.ms-excel")
profile.set_preference("browser.helperApps.neverAsk.saveToDisk", "text/csv,application/vnd.ms-excel")
profile.set_preference("browser.download.folderList", 2);
profile.set_preference("browser.download.dir", "/home/suomi422")
driver = webdriver.Firefox(firefox_profile=profile)

but for the .xls files i tried with this settings

profile.set_preference("browser.helperApps.neverAsk.openFile","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
profile.set_preference("browser.helperApps.neverAsk.saveToDisk", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")

which doesn't works...

this is how the pop-up looks like.

POP-UP Screenshot

0 Answers0