Сhrome Options capability not working


I’m trying to download files using chromeoptions. However the following code is working at my system but not at my colleague’s.

<capability name="chromeOptions">
<script return="chromeArgs"><![CDATA[
//for getting 'Save As' dialogue box while downloading any file
downloadFilepath = node_path.toString();
import java.util.Hashtable;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.chrome.ChromeOptions;
ChromeOptions options = new ChromeOptions();
Map<String, Object>chromePrefs = new Hashtable<String, Object>();
chromePrefs.put("plugins.always_open_pdf_externally", true);
chromePrefs.put("download.default_directory", downloadFilepath);
options.setExperimentalOption("prefs", chromePrefs);
options.setExperimentalOption("w3c", false);
chromeArgs = options;

What could be the reason for this behaviour?

Thanks in advance.

Kind regards,
Tanvi Lad

I am facing same issue. chrome option capability not working for auto download to specified folder.
can you please tell me what could be the issue.