# Possible to change chrome default download path?

**URL:** <https://forum.katalon.com/t/possible-to-change-chrome-default-download-path/17710>\
**Category:** Web Testing\
**Tags:** katalon-studio\
**Created:** [January 14, 2019, 9:10pm UTC](https://forum.katalon.com/t/possible-to-change-chrome-default-download-path/17710 "2019-01-14T21:10:19Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ankita\_Raman](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/ankita_raman/32/742_2.png) [@Ankita\_Raman](https://forum.katalon.com/u/Ankita_Raman)\
**Post date:** [January 14, 2019, 9:10pm UTC](https://forum.katalon.com/t/possible-to-change-chrome-default-download-path/17710/1 "2019-01-14T21:10:19Z")

</div>

I basically trying to open a new tab in already opened chrome browser and then trying to run katalon from starting from giving address to further step. So here I want to change the default chrome download path .  
It’s my poc requirement that I have to execute katalon in the next tab of already opened window.

Is there any way we can change path bz as per my knowledge if I try doing with selenium then it changes the path of the chromium not chrome ( correct me if I am wrong)

Plz let me know the possible solution. Thanks

---

<div class="post-metadata">

**Author:** ![Brandon\_Hein](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/brandon_hein/32/1092_2.png) [@Brandon\_Hein](https://forum.katalon.com/u/Brandon_Hein)\
**Post date:** [January 14, 2019, 9:36pm UTC](https://forum.katalon.com/t/possible-to-change-chrome-default-download-path/17710/2 "2019-01-14T21:36:21Z")

</div>

You can configure the default download directory as follows:

1.) Open Project \> Settings \> Desired Capabilities \> Web UI \> Chrome:

 ![image](https://europe1.discourse-cdn.com/katalon/uploads/default/uploads/default/original/2X/d/d1c52bf6af36c0948debcf76a0246326ff14104f.png)

2.) Click the ‘Add’ button, and set the name of the new property to ‘prefs’, the type to ‘Dictionary’:

 ![image](https://europe1.discourse-cdn.com/katalon/uploads/default/uploads/default/original/2X/5/5db5ba6f8bfb1a3b92d9178482516a23ef530537.png)

3.) In the value column, click on the ellipses, and set name = ‘download.default\_directory’, type = String, value = ‘my/downlaod/directory’:

 ![image](https://europe1.discourse-cdn.com/katalon/uploads/default/uploads/default/original/2X/1/1dd55169d9738d587d6ae42d24f06225c45f8b86.png)

Hope this helps!

---

<div class="post-metadata">

**Author:** ![Ankita\_Raman](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/ankita_raman/32/742_2.png) [@Ankita\_Raman](https://forum.katalon.com/u/Ankita_Raman)\
**Post date:** [January 15, 2019, 3:58am UTC](https://forum.katalon.com/t/possible-to-change-chrome-default-download-path/17710/3 "2019-01-15T03:58:14Z")

</div>

Thanks Brandon but I believe it will change the path of chromium not the chrome window which is already open  
☹

---

<div class="post-metadata">

**Author:** ![Brandon\_Hein](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/brandon_hein/32/1092_2.png) [@Brandon\_Hein](https://forum.katalon.com/u/Brandon_Hein)\
**Post date:** [January 15, 2019, 5:26pm UTC](https://forum.katalon.com/t/possible-to-change-chrome-default-download-path/17710/4 "2019-01-15T17:26:35Z")

</div>

I’m not sure what you mean. Katalon (and, by extension, Selenium) uses chromedriver to interact with an active instance of the Chrome browser. The steps that I’ve provided above are the equivalent of changing the following setting on your manually-opened Chrome instance:

 ![image](https://europe1.discourse-cdn.com/katalon/original/2X/d/d0d0fcff656b81ca0523289bca1be6891e5586bc.png)

All of this comes down to the fact that you need a chromedriver that references an active browser instance. Without this, the puppet master has no strings to manipulate the puppet with.

---

<div class="post-metadata">

**Author:** ![Ankita\_Raman](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/ankita_raman/32/742_2.png) [@Ankita\_Raman](https://forum.katalon.com/u/Ankita_Raman)\
**Post date:** [January 15, 2019, 6:33pm UTC](https://forum.katalon.com/t/possible-to-change-chrome-default-download-path/17710/5 "2019-01-15T18:33:50Z")

</div>

well thanks alot @Bradon\_Hein lemme try today once I am back at my office and will update you whther it worked for me or not .Thanks for replying !! 🙂

---

<div class="post-metadata">

**Author:** ![Ankita\_Raman](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/ankita_raman/32/742_2.png) [@Ankita\_Raman](https://forum.katalon.com/u/Ankita_Raman)\
**Post date:** [January 16, 2019, 4:19am UTC](https://forum.katalon.com/t/possible-to-change-chrome-default-download-path/17710/6 "2019-01-16T04:19:52Z")

</div>

Thanks it worked 😊

---

<div class="post-metadata">

**Author:** ![francorebu](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/francorebu/32/16103_2.png) [@francorebu](https://forum.katalon.com/u/francorebu)\
**Post date:** [February 26, 2019, 5:34pm UTC](https://forum.katalon.com/t/possible-to-change-chrome-default-download-path/17710/7 "2019-02-26T17:34:31Z")

</div>

Thanks Brandon! those steps solved my problem downloading Excel files in Google Chrome versión 72 and katalon studio 5.9

---

<div class="post-metadata">

**Author:** ![Rakesh\_Kumar](https://avatars.discourse-cdn.com/v4/letter/r/ba9def/32.png) [@Rakesh\_Kumar](https://forum.katalon.com/u/Rakesh_Kumar)\
**Post date:** [August 22, 2019, 7:44pm UTC](https://forum.katalon.com/t/possible-to-change-chrome-default-download-path/17710/9 "2019-08-22T19:44:50Z")

</div>

> [@Brandon\_Hein](#):
>
> download.default\_directory

It works. Thanks.  
How can I set it by code before using WebUI.openBrowser() ?

---

<div class="post-metadata">

**Author:** ![michelle](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@michelle](https://forum.katalon.com/u/michelle)\
**Post date:** [September 12, 2019, 6:40am UTC](https://forum.katalon.com/t/possible-to-change-chrome-default-download-path/17710/10 "2019-09-12T06:40:44Z")

</div>

Hi, is there a way to do this using Script? How will this work if I have dynamic directories since we are a team.

Thanks!

---

<div class="post-metadata">

**Author:** ![aiman.rooman](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@aiman.rooman](https://forum.katalon.com/u/aiman.rooman)\
**Post date:** [September 25, 2019, 10:43am UTC](https://forum.katalon.com/t/possible-to-change-chrome-default-download-path/17710/11 "2019-09-25T10:43:03Z")

</div>

This works absolutely fine but is it possible to change download path in a new window in chrome in already running test case…as in my test case two window opens up and i want to download images in different location for each window.

---

<div class="post-metadata">

**Author:** ![Mehran\_Shafqat](https://avatars.discourse-cdn.com/v4/letter/m/7ea924/32.png) [@Mehran\_Shafqat](https://forum.katalon.com/u/Mehran_Shafqat)\
**Post date:** [October 9, 2019, 10:39pm UTC](https://forum.katalon.com/t/possible-to-change-chrome-default-download-path/17710/12 "2019-10-09T22:39:43Z")

</div>

Can i pass the folder path relative ? e.g I have create download folder on run time and its available in katalon project folder so how can i pass this folder relative path please ?

---

<div class="post-metadata">

**Author:** ![nirav.makwana](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/nirav.makwana/32/8032_2.png) [@nirav.makwana](https://forum.katalon.com/u/nirav.makwana)\
**Post date:** [November 20, 2019, 9:44am UTC](https://forum.katalon.com/t/possible-to-change-chrome-default-download-path/17710/13 "2019-11-20T09:44:01Z")

</div>

Not working in the following configuration:  
Katalon Version : 6.3.3  
Chrome Version 78.0.3904.97

---

<div class="post-metadata">

**Author:** ![bhargavia](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/bhargavia/32/16103_2.png) [@bhargavia](https://forum.katalon.com/u/bhargavia)\
**Post date:** [June 18, 2020, 11:10am UTC](https://forum.katalon.com/t/possible-to-change-chrome-default-download-path/17710/14 "2020-06-18T11:10:57Z")

</div>

Hi, @Ankita_Raman I am trying to downloading two different kinds of files one is CSV and the 2nd one is PDF I need to keep it separated into two different folders. Can you please suggest to me how it will work.

---

<div class="post-metadata">

**Author:** ![jtheoret](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/jtheoret/32/4458_2.png) [@jtheoret](https://forum.katalon.com/u/jtheoret)\
**Post date:** [January 23, 2024, 1:56pm UTC](https://forum.katalon.com/t/possible-to-change-chrome-default-download-path/17710/15 "2024-01-23T13:56:41Z")

</div>

is it possible to put a relative path?

---

<div class="post-metadata">

**Author:** ![barry.reid](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/barry.reid/32/20483_2.png) [@barry.reid](https://forum.katalon.com/u/barry.reid)\
**Post date:** [January 30, 2024, 8:51am UTC](https://forum.katalon.com/t/possible-to-change-chrome-default-download-path/17710/16 "2024-01-30T08:51:32Z")

</div>

It would be good if you could use something like …

import com.kms.katalon.core.configuration.RunConfiguration as RunConfiguration

GlobalVariable.UploadFilePath = (RunConfiguration.getProjectDir() + ‘/Data Files/’) …

This dynamically gets a filepath for me where I store files to be uploaded, it works locally on my laptop and remotely via TestOps. What we need is some way to dynamically do the reverse of this, i.e. set a path, not get one. If anyone knows how to achieve that I would be more than interested. I don’t see how that could be added to the project settings.

---

<div class="post-metadata">

**Author:** ![jtheoret](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/jtheoret/32/4458_2.png) [@jtheoret](https://forum.katalon.com/u/jtheoret)\
**Post date:** [February 9, 2024, 2:52pm UTC](https://forum.katalon.com/t/possible-to-change-chrome-default-download-path/17710/17 "2024-02-09T14:52:23Z")

</div>

This is what I found that is working for me and not messing up other settings that I already have:

```
//Set Browser Capabilities.
Map desiredCapabilities = RunConfiguration.getDriverPreferencesProperties("WebUI")
String DownloadFolderPath1=RunConfiguration.getReportFolder()
String DownloadFolderPath=DownloadFolderPath1.replace('/', '\\')
KeywordUtil.logInfo(DownloadFolderPath)
Map prefs = desiredCapabilities.get("prefs")
if (prefs == null) {
	prefs = [:]
}
prefs.put("download.default_directory", DownloadFolderPath)
prefs.put("download_dir", DownloadFolderPath)
prefs.put("download.prompt_for_download", false)
RunConfiguration.setWebDriverPreferencesProperty("prefs", prefs)
WebUI.openBrowser(url)

```
