How can I use JavaScript to change the default download directory? I have a list of folders and one is named "C:\Study\Selenium". How do I update the location for downloaded files to this specific path in my code?
chromeOptions.setUserPreferences('download.default_directory': "C:\Study\Selenuim");
chromeOptions.setUserPreferences({'download.prompt_for_download': false});
chromeOptions.setUserPreferences({'download.directory_upgrade': true});
Unfortunately, this code snippet does not seem to be changing the folder location as intended.