# How to test in parallel using specific chrome profile in katalon?

**URL:** <https://forum.katalon.com/t/how-to-test-in-parallel-using-specific-chrome-profile-in-katalon/56233>\
**Category:** Web Testing\
**Tags:** katalon-studio\
**Created:** [July 1, 2021, 9:23am UTC](https://forum.katalon.com/t/how-to-test-in-parallel-using-specific-chrome-profile-in-katalon/56233 "2021-07-01T09:23:17Z")\
**Posts on this page:** 8\
**Page:** 2

<div class="post-metadata">

**Author:** ![ziyaad.ellahee](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/ziyaad.ellahee/32/16103_2.png) [@ziyaad.ellahee](https://forum.katalon.com/u/ziyaad.ellahee)\
**Post date:** [December 21, 2021, 11:53am UTC](https://forum.katalon.com/t/how-to-test-in-parallel-using-specific-chrome-profile-in-katalon/56233/24 "2021-12-21T11:53:14Z")

</div>

Do you think that when running with headless mode, it load all the cookies in the browser?

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [December 21, 2021, 11:53am UTC](https://forum.katalon.com/t/how-to-test-in-parallel-using-specific-chrome-profile-in-katalon/56233/25 "2021-12-21T11:53:32Z")

</div>

> [@ziyaad.ellahee](#):
>
> Do you think that when running with headless mode, it load all the cookies in the browser?

I don’t know.

As for plain old browsers (decade old FF, IE), yes, I could trick them to load the cookies I injected. Therefore previously I had a guess that I can trick Chrome (and Headless Chrome) to load all cookies by starting it with specific User Profile specified. I did some experiments and observations, but I could not see how Chrome works internally.

I have developed a library (WebDriverFactory4ks) but I am not sure if it is useful.

I would recommend to you, @ziyaad.ellahee , not to use this, not to try to trick Chrome. I suppose that you might encounter more cases where you are refused by Chrome somehow, like “You must enrole your browser to authenticate”.

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [December 21, 2021, 1:31pm UTC](https://forum.katalon.com/t/how-to-test-in-parallel-using-specific-chrome-profile-in-katalon/56233/26 "2021-12-21T13:31:56Z")

</div>

~~I did a quick check.~~

> [@ziyaad.ellahee](#):
>
> Do you think that when running with headless mode, it load all the cookies in the browser?

~~No, no cookies are loaded. I am not sure if cookies are stored into the Chrome User Profile but not loaded next time, or if cookies are not stored into the user profile at all. I am afraid, my WebDriverFactory4ks library is useless.~~

I haven’t been able to verify if a cookie which were saved by the 1st session into a Chrome User Profile “Katalon” is reloaded into the 2nd session and sent injected into a HTTP request header. Perhaps I need to invent a HTTP server for this verification.

---

<div class="post-metadata">

**Author:** ![ziyaad.ellahee](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/ziyaad.ellahee/32/16103_2.png) [@ziyaad.ellahee](https://forum.katalon.com/u/ziyaad.ellahee)\
**Post date:** [December 21, 2021, 2:07pm UTC](https://forum.katalon.com/t/how-to-test-in-parallel-using-specific-chrome-profile-in-katalon/56233/27 "2021-12-21T14:07:50Z")

</div>

> [@kazurayam](#):
>
> As for plain old browsers (decade old FF, IE), ye

Yes, what confused me is that, when the same test is run with UI, it pass but in headless mode it fail.  
There is a mystery somewhere. What are the difference when test via UI & headless?

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [December 21, 2021, 2:17pm UTC](https://forum.katalon.com/t/how-to-test-in-parallel-using-specific-chrome-profile-in-katalon/56233/28 "2021-12-21T14:17:15Z")

</div>

> [@ziyaad.ellahee](#):
>
> What are the difference when test via UI & headless?

I have no idea.

Nobody can be sure about the internal of browsers. I think you should not depend on heuristics about the browser’s behaviour.

---

<div class="post-metadata">

**Author:** ![ziyaad.ellahee](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/ziyaad.ellahee/32/16103_2.png) [@ziyaad.ellahee](https://forum.katalon.com/u/ziyaad.ellahee)\
**Post date:** [December 21, 2021, 2:28pm UTC](https://forum.katalon.com/t/how-to-test-in-parallel-using-specific-chrome-profile-in-katalon/56233/29 "2021-12-21T14:28:21Z")

</div>

I ran both test via UI and headless, only difference i noticed:

In UI:

> Starting ChromeDriver 95.0.4638.17 (a9d0719444d4b035e284ed1fce73bf6ccd789df2-refs/branch-heads/4638@{#178}) on port **8189**

Via Headless:

> Starting ChromeDriver 95.0.4638.17 (a9d0719444d4b035e284ed1fce73bf6ccd789df2-refs/branch-heads/4638@{#178}) on port **17977**

Is this something that we can play with?

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [December 21, 2021, 10:51pm UTC](https://forum.katalon.com/t/how-to-test-in-parallel-using-specific-chrome-profile-in-katalon/56233/30 "2021-12-21T22:51:34Z")

</div>

> [@ziyaad.ellahee](#):
>
> Is this something that we can play with?

I don’t think so.

8189 and 17977 — these are the port number which Chrome browser listens for incoming messages from ChromeDriver. The port number is decided dynamically by ChromeDriver when it launches the Chrome browser. The port number itself means nothing functional, I think.

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [December 24, 2021, 5:06am UTC](https://forum.katalon.com/t/how-to-test-in-parallel-using-specific-chrome-profile-in-katalon/56233/31 "2021-12-24T05:06:14Z")

</div>

> [@kazurayam](#):
>
> I haven’t been able to verify if a cookie which were saved by the 1st session into a Chrome User Profile “Katalon” is reloaded into the 2nd session and sent injected into a HTTP request header.

I have examined this issue, and found that the ChromeDriverFactory of v0.3.5 of WebDriverFactory4ks **does NOT reload** the cookies saved by the 1st session into the 2nd session. See [Make sure if a Chrome Headless browser launched with a User Profile specified retain ALL cookies that have been created · Issue #11 · kazurayam/WebDriverFactory4ks · GitHub](https://github.com/kazurayam/WebDriverFactory4ks/issues/11) for your interest.

Due to this problem, I think that [WebDriverFactory4ks](https://github.com/kazurayam/WebDriverFactory4ks) v0.3.5 is effectively useless. People should not use this at all.

This problem might require deep hack. I have no idea, at the moment, if I could improve this in future.

[Previous page](https://forum.katalon.com/t/how-to-test-in-parallel-using-specific-chrome-profile-in-katalon/56233.md?page=1)
