Download files using desired capabilities from Firefox and chrome NOT WORKING in 7.0.5 version

Hi Everyone,

There is one button which contains the pdf file. When i am clicking on it, it is not downloading in Downloads folder rather it is opening in new window. I tried with both Firefox browser and chrome options also.Nothing is working. What i have seen at the run the time when the browser is getting opened from Katalon studio the settings of chrome or firfox for PDF Documents change to open in new window rather than downloading. I have used the below code but it is not WORKING:
For Firefox i set the capabilities in Settings of katalon studio below is the screenshot:
as it is pdf file i used application/Pdf:

For chrome i am using settings:

HashMap<String, Object> chromePrefs = new HashMap<String, Object>()
chromePrefs.put(“download.default_directory”, downloadPath)
chromePrefs.put(“download.prompt_for_download”, false)

    // specify path to ChromeDriver
System.setProperty("", projDir + "\\Files\\chromedriver.exe")
ChromeOptions options = new ChromeOptions()
options.setExperimentalOption("prefs", chromePrefs)

    // create web driver
WebDriver driver = new ChromeDriver(options)

    // use your driver instead of default one

Nothing is working. Please help me guys: