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