Is this possible to use Katalon to download a file?

@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
    }
  }
}


I also updated my repo with the Firefox desired capabilities. You can pull the code and run the sample test.

Also, could you please let us know when did you get the info on which capabilities should be used and what those capabilities mean? I’ve spent a lot of time trying to find the right capabilities but whatever I found wasn’t working.

Chrome and Firefox provide their desired capabilities at their website, you should read these documents first:

Next step, you need to search in the Selenium communities about this issue and realize the problem here. Eg:

  • When clicking on a normal file (not pdf), Chrome and Firefox will ask to download the file. You need to find the desired capability to tell the browser don’t ask about to download.
  • When clicking on a pdf file, Chrome and Firefox will display the file using the pdf viewer. You need to find the desired capability to tell the browser to treat the pdf as a normal file.

During the test, you should open Chrome settings and Firefox about:config to check that all desired capabilities have been recognised by the browser.

2 Likes