Edge Chromium default download directory

Hi,

For one of my Web UI test cases I have a requirement to click to download a file and I would like to have this downloaded to a particular folder.

I have followed the various guidance on the forum to add a ‘download.default_directory’ prefs value to the driver files and when testing with Chrome the file is downloaded to the correct folder; however this is not the case when using Edge Chromium and the file continues to be downloaded to the default ‘my downloads’ folder.

Can anyone advise how this should be configured for Edge Chromium? Below is what I have configured within the ‘settings\internal\com.kms.katalon.core.webui.edge chromium.properties’ file.

{"EDGE_CHROMIUM_DRIVER":{"acceptInsecureCerts":true,"prefs":{"download.default_directory":"C:\\git\\Katalon-Tests-ACT-1\\Downloads","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-dev-shm-usage"],"useAutomationExtension":"false"}}

Regards,

Daniel

1 Like

Is anyone able to help with this?

Hi @Daniel_Wilkinson,

For Edge Chromium, the desired capabilities should be:

{
  "ms:edgeChrominum": true,
  "ms:edgeOptions": {
    "prefs": {
      "download.default_directory": "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-dev-shm-usage"
    ],
    "useAutomationExtension": "false"
  }
}

Sample project: https://github.com/duyluonganh/kat-download-file

@duyluong Thanks, this has resolved the issue.

1 Like