# WEB - Chrome : Specified profile in the desired capabilities does not take effect

**URL:** <https://forum.katalon.com/t/web-chrome-specified-profile-in-the-desired-capabilities-does-not-take-effect/87018>\
**Category:** Bug Report\
**Tags:** chrome, desired-capabilities, web-testing, profile, katalon-studio\
**Created:** [April 13, 2023, 11:48pm UTC](https://forum.katalon.com/t/web-chrome-specified-profile-in-the-desired-capabilities-does-not-take-effect/87018 "2023-04-13T23:48:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![yassine.nejjar](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/yassine.nejjar/32/22831_2.png) [@yassine.nejjar](https://forum.katalon.com/u/yassine.nejjar)\
**Post date:** [April 13, 2023, 11:48pm UTC](https://forum.katalon.com/t/web-chrome-specified-profile-in-the-desired-capabilities-does-not-take-effect/87018/1 "2023-04-13T23:48:54Z")

</div>

### Operating System

Windows Server 2016 Standard

### Katalon Studio version

version 8.6.0

### Environment (for Web Testing)

- Chrome 112.0.5615.87 (Build officiel) (64 bits)

### Issue

In order to use a preset history and cache, we would like to launch a chrome session with a specific profile. (The profile is already created and available).

We’ve set the following prefs in the desired capabilities menu :

- user-data-dir ==\> path to the data directory
- profile-directory ==\> profile name

When launching the test case, katalon seems to note take into considération those settings.

the chromedriver start with this arg instead --user-data-dir=“C:\Program Files (x86)\scoped\_dir10120\_1882402140” which is a temporary folder for that execution.

to get things done, i’ve had to write the following code :

```auto
def profilePath = 'C:\\Users\\Administrateur.WIN-5LV44M17JV8\\AppData\\Local\\Google\\Chrome\\User Data'

def profiledir = 'Profile 1'

System.setProperty('webdriver.chrome.driver', 'C:\\ProgramData\\Katalon_Studio_Windows_64-8.6.0\\configuration\\resources\\drivers\\chromedriver_win32\\chromedriver.exe')

ChromeOptions options = new ChromeOptions()

options.addArguments('user-data-dir=' + profilePath)

options.addArguments('profile-directory=' + profiledir)

WebDriver driver = new ChromeDriver(options)

DriverFactory.changeWebDriver(driver)

```

and finally managed to launch chrome with selected profile.

Could you please tell me why setting the profile in the desired capabilitites menu does not take effect ?

Here is the log when launching the TC

User set preference: [‘prefs’, ‘{download.default\_directory=C:\Users\Administrateur.WIN-5LV44M17JV8\Desktop\Fichiers Katalon\Download, prompt\_for\_download=false, safebrowsing.enabled=true, user-data-dir=C:\Users\Administrateur.WIN-5LV44M17JV8\AppData\Local\Google\Chrome\User Data, profile-directory=Profile 1}’]

Thanks in advance

---

<div class="post-metadata">

**Author:** ![jmeintjesn7](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/jmeintjesn7/32/23248_2.png) [@jmeintjesn7](https://forum.katalon.com/u/jmeintjesn7)\
**Post date:** [April 14, 2023, 7:03am UTC](https://forum.katalon.com/t/web-chrome-specified-profile-in-the-desired-capabilities-does-not-take-effect/87018/2 "2023-04-14T07:03:14Z")

</div>

Hi @yassine.nejjar

Can you please add a screenshot of your Desired Capabilities menu with the settings you entered there?

So that I can see how you entered the fields.

I use the Desired Capabilities menu and my setting do take affect as below

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

 ![image](https://europe1.discourse-cdn.com/katalon/original/3X/6/9/69746f6ce6cccb344ff5c3992477af9891a27526.png)

---

<div class="post-metadata">

**Author:** ![yassine.nejjar](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/yassine.nejjar/32/22831_2.png) [@yassine.nejjar](https://forum.katalon.com/u/yassine.nejjar)\
**Post date:** [April 17, 2023, 10:34am UTC](https://forum.katalon.com/t/web-chrome-specified-profile-in-the-desired-capabilities-does-not-take-effect/87018/3 "2023-04-17T10:34:43Z")

</div>

Hello @jmeintjesn7,

You can see in the desired capabilities, that i have exactly the same values (user-data-dir and profile-directory) as those written in the code.

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

and katalon seems to take into considération those settings only when it’s written in the code.

 ![image](https://europe1.discourse-cdn.com/katalon/original/3X/a/1/a1cf36053ff547e1dbdcc223d6d1878e1c202897.png)

Thanks you

---

<div class="post-metadata">

**Author:** ![jmeintjesn7](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/jmeintjesn7/32/23248_2.png) [@jmeintjesn7](https://forum.katalon.com/u/jmeintjesn7)\
**Post date:** [April 17, 2023, 11:08am UTC](https://forum.katalon.com/t/web-chrome-specified-profile-in-the-desired-capabilities-does-not-take-effect/87018/4 "2023-04-17T11:08:11Z")

</div>

There is another thing you could try. This is to add the capabilities to the Chrome (headless) as well. It might be running on the Chrome (headless) driver

 ![image](https://europe1.discourse-cdn.com/katalon/original/3X/8/b/8b230afdc78b4abf06e9a53f44bc21e9f41171a9.png)

Also what helped me is to directly edit the desired capabilities file in a text editor:

Location:

**Headless Chrome driver**  
{directory to katalon project}\settings\internal\com.kms.katalon.core.webui.chrome (headless).properties

**Chrome driver**  
{directory to katalon project}\settings\internal\com.kms.katalon.core.webui.chrome.properties

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