# Katalon always launches Chrome for Testing with "No protection" in security preventing certain downloads

**URL:** <https://forum.katalon.com/t/katalon-always-launches-chrome-for-testing-with-no-protection-in-security-preventing-certain-downloads/141614>\
**Category:** Web Testing\
**Tags:** katalon-studio\
**Created:** [August 13, 2024, 10:44pm UTC](https://forum.katalon.com/t/katalon-always-launches-chrome-for-testing-with-no-protection-in-security-preventing-certain-downloads/141614 "2024-08-13T22:44:06Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![matthew.burke1](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/matthew.burke1/32/23870_2.png) [@matthew.burke1](https://forum.katalon.com/u/matthew.burke1)\
**Post date:** [August 13, 2024, 10:44pm UTC](https://forum.katalon.com/t/katalon-always-launches-chrome-for-testing-with-no-protection-in-security-preventing-certain-downloads/141614/1 "2024-08-13T22:44:06Z")

</div>

In my project I have a test that requires Chrome for Testing to click a link to download a certificate (.cer) file. Chrome for Testing prevents this download (see image). The browser displays a message which claims that I need to have an elevated security setting level to download the file, but when I launch Chrome for Testing manually (with the .exe file) and set security to No Protection, the file still downloads fine… so the security level does not seem to be the real reason it is prevented from being downloaded.

The only time Chrome for Testing prevents the .cer file from being downloaded is when Katalon launches it. Anyone have ideas on how to get Chrome for Testing, launched by Katalon, to download this file type?

 ![Screenshot 2024-08-13 110210](https://europe1.discourse-cdn.com/katalon/original/3X/6/6/66ef09f01a8f1aa83f09dce63dd55b3ea622a42e.jpeg)

---

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/katalon/original/3X/d/5/d55596ab02785a255798e87ede769734747b30c4.svg) [@system](https://forum.katalon.com/u/system)\
**Post date:** [August 13, 2024, 10:44pm UTC](https://forum.katalon.com/t/katalon-always-launches-chrome-for-testing-with-no-protection-in-security-preventing-certain-downloads/141614/2 "2024-08-13T22:44:06Z")

</div>

Hi there,

Thank you very much for your topic. Please note that it may take a little while before a member of our community or from Katalon team responds to you.

Thanks!

---

<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:** [August 14, 2024, 5:02am UTC](https://forum.katalon.com/t/katalon-always-launches-chrome-for-testing-with-no-protection-in-security-preventing-certain-downloads/141614/3 "2024-08-14T05:02:15Z")

</div>

To open browser, do you call

- “WebUI.openBrowser()”
- or “new ChromeDriver()”

These two methods work quite differently. You should make it clear to us.

> [@matthew.burke1](#):
>
> In my project I have a test that requires Chrome for Testing to click a link to download a certificate (.cer) file. Chrome for Testing prevents …

As far as I know, KatalonStudio launches “Chrome” by `WebUI.openBrowser()` keyword as default; it does not lauch “Chrome for Test” unless you customly configured your project.

How did you configured your katalon project? Please show your code.

---

<div class="post-metadata">

**Author:** ![dineshh](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/dineshh/32/24488_2.png) [@dineshh](https://forum.katalon.com/u/dineshh)\
**Post date:** [August 14, 2024, 5:25am UTC](https://forum.katalon.com/t/katalon-always-launches-chrome-for-testing-with-no-protection-in-security-preventing-certain-downloads/141614/4 "2024-08-14T05:25:24Z")

</div>

Can you add desired capabilities and check once again

```auto
options = Options()
options.add_experimental_option("prefs", {
  "download.default_directory": "C:\Users\xxx\downloads\Test",
  "download.prompt_for_download": False,
  "download.directory_upgrade": True,
  "safebrowsing.enabled": True,
  "profile.default_content_setting_values.automatic_downloads": 2,
    })

```

---

<div class="post-metadata">

**Author:** ![matthew.burke1](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/matthew.burke1/32/23870_2.png) [@matthew.burke1](https://forum.katalon.com/u/matthew.burke1)\
**Post date:** [August 14, 2024, 6:50pm UTC](https://forum.katalon.com/t/katalon-always-launches-chrome-for-testing-with-no-protection-in-security-preventing-certain-downloads/141614/5 "2024-08-14T18:50:35Z")

</div>

Hi dineshh,

Are these things that I should add to the desired capabilities for chrome? Or is this code I should add to my browser launcher script? Sorry, I’m just not sure how to use that. Thank you! I am just launching chrome for testing with this:

WebUI.openBrowser(GlobalVariable.LS\_Server\_IP)  
WebUI.maximizeWindow()

This is where I was trying to add a few basic launch arguments but they didn’t seem to work with chrome for testing.

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

There seems to be an ‘r’ in the line specifying the default directory in your code, should that be there? I removed that character from your code when adding it to my script. When I added your snippet to my script file the font colors changed of commands so it makes me think maybe something isn’t right?

 ![image](https://europe1.discourse-cdn.com/katalon/original/3X/7/2/725909a0b3b31a836964fb80644537bdf6041c67.jpeg)

This is how the fonts look before adding your snippet:

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

This is what my desired capabilities properties file looks like; it has one item added, but that launch argument has in impact sadly.

{“CHROME\_DRIVER”:{“binary”:“c:\Program Files\Google\Chrome for Testing\Chrome-Win64\Chrome.exe”,“args”:[“–safebrowsing-enable-standard-protection”]}}

I just tried adding them to the desired capabilities, it didn’t seem to fix the issue (maybe I am doing it wrong so I just thought i’d try this)

 ![image](https://europe1.discourse-cdn.com/katalon/original/3X/e/b/eb76d854a8d336634ae8b6ef5bf5a9e116b59d24.jpeg)

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

---

<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:** [August 14, 2024, 11:51pm UTC](https://forum.katalon.com/t/katalon-always-launches-chrome-for-testing-with-no-protection-in-security-preventing-certain-downloads/141614/6 "2024-08-14T23:51:18Z")

</div>

I found a red underline in the screenshot you shared above.

 ![スクリーンショット 2024-08-15 8.42.44](https://europe1.discourse-cdn.com/katalon/original/3X/a/8/a8436e751ce8c1df377e11cf9bf5f8f76e8966fa.jpeg)

In a Groovy script, in a string literal, a backslash character \ must be escaped by a backslash character prepended

Wrong:

```auto
"C:\Users\admin\downloads"

```

Right

```auto
"C:\\Users\\admin\\downloads"

```

See the Groovy doc [here](https://groovy-lang.org/syntax.html#_escaping_special_characters)

---

<div class="post-metadata">

**Author:** ![dineshh](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/dineshh/32/24488_2.png) [@dineshh](https://forum.katalon.com/u/dineshh)\
**Post date:** [August 15, 2024, 5:04am UTC](https://forum.katalon.com/t/katalon-always-launches-chrome-for-testing-with-no-protection-in-security-preventing-certain-downloads/141614/7 "2024-08-15T05:04:24Z")

</div>

please try the above solution
