1

I am trying to suppress the Save as Dialog window by setting the default download directory path. Below is the code i am using, it is still showing the Save as dialog instead of downloading it to the set directory path.

  • def customCapabilities = """ { "capabilities": { "browserName":"chrome", "goog:chromeOptions": { "args":["--start-maximized", "--disable-popup-blocking"], "prefs": { "download.default_directory":"C:\Users\automation\downloads", "download.prompt_for_download":false, "safebrowsing.enabled":false } } } } """

    • configure driver = { type: 'chrome', executable: 'C:\Program Files\Google\Chrome\Application\chrome.exe', addOptions: ["--remote-allow-origins=*"], showDriverLog: true, webDriverSession: '#(customCapabilities)' }

Not able to figure what i am doing wrong here

I was expecting the save as dialog not to show and download the file directly in the mentioned downloaded path

  • the best info on this subject can be found here (read the comments): https://stackoverflow.com/q/74391807/143475 - anyone is welcome to improve karate or suggest better solutions – Peter Thomas Aug 21 '23 at 12:05

0 Answers0