Hi @pgonzalez
To download a file in Chrome headless, you can preset via the Desired Capabilities settings. The solution and an example you can find at this post:
Chrome:
@gdearest07
To download pdf file in Chrome automatically using Selenium. You should configure these capabilities:
{
"prefs": {
"download.default_directory": "Your download folder",
"download.directory_upgrade": true,
"download.prompt_for_download": false,
"plugins.always_open_pdf_externally": true,
"profile.default_content_settings.popups": "0",
"profile.content_settings.exceptions.automatic_downloads.*.setting": "1"
},
"args": [
"--no-sandbox",
"--disable…
Firefox:
@gdearest07
“browser.download.manager.showWhenStartingbrowser.download.manager.showWhenStarting”
Yep, this desired capability is unnecessary. Just a typo mistake.
To apply with Firefox, you should use these capabilities:
{
"moz:firefoxOptions": {
"prefs": {
"browser.helperApps.neverAsk.saveToDisk": "application/vnd.ms-excel, application/pdf",
"pdfjs.disabled": true,
"browser.download.dir": "Your download folder",
"browser.download.folderList": 2
}
}
}
[C…