I want to download files automatically to particular folder using Firefox(54.0.1 (32-bit))
and Selenium
. Now I'm getting the download window each time, when I want to download a file(.pdf
) and the path is always default(I want to customise it). What I have tried (serenity.properties
):
browser.download.lastDir = C:\\Path\\To\\The\\File\\
browser.download.folderList = 2
browser.download.dir = C:\\Path\\To\\The\\File\\
download.prompt_for_download = false
browser.download.manager.showWhenStarting = false
browser.download.manager.addToRecentDocs = true
browser.download.manager.useWindow = false
browser.download.useDownloadDir = true
browser.download.show_plugins_in_list = true
browser.download.animateNotifications = false
browser.helperApps.neverAsk.saveToDisk = text/plain,application/octet-stream,application/pdf
browser.helperApps.neverAsk.openFile = text/plain,application/octet-stream,application/pdf
browser.helperApps.alwaysAsk.force = false
pdfjs.disabled = true
plugin.scan.Acrobat = 99.0
plugin.scan.plid.all = false
plugin.disable_full_page_plugin_for_types = application/pdf
pdfjs.enabledCache.state = false
For example in chrome it works for me with this settings(serenity.properties
)
chrome_preferences.safebrowsing.enabled = true
chrome_preferences.download.default_directory = C:\\Path\\To\\The\\File\\
chrome_preferences.profile_default_content_settings.popups = 0
PS I have tried already many suggestions from the Internet inclusive this site, but still no luck. Any suggestions?