c# - When i set Webdriver Firefox profile to download all files by default it not working -
i set firefox profile download files default when comes images pops open dialog , asked me weather save or view . code utilize follows
var foldername = "temp"; var profile = new firefoxprofile { enablenativeevents = true }; profile.setpreference("browser.download.folderlist", 2); profile.setpreference("browser.download.manager.showwhenstarting", false); profile.setpreference("browser.download.dir", foldername); profile.setpreference("browser.download.downloaddir", foldername); profile.setpreference("browser.download.defaultfolder", foldername); profile.setpreference("browser.helperapps.neverask.savetodisk", "application/all"); _webdriver = new firefoxdriver(profile);
application/all
is not valid mime type. config entry take comma delimited list of mime types.
there no way tell "all files". need supply list of mime types.
this limitation of firefox not selenium.
c# firefox selenium webdriver selenium-webdriver
No comments:
Post a Comment