# Getting chromedriver.log when you run Record/Spy Web to investigate why KS failed to start Chrome

**URL:** <https://forum.katalon.com/t/getting-chromedriver-log-when-you-run-record-spy-web-to-investigate-why-ks-failed-to-start-chrome/10886>\
**Category:** Web Testing\
**Tags:** chrome, tips-tricks, katalon-studio\
**Created:** [May 14, 2018, 2:03am UTC](https://forum.katalon.com/t/getting-chromedriver-log-when-you-run-record-spy-web-to-investigate-why-ks-failed-to-start-chrome/10886 "2018-05-14T02:03:19Z")\
**Posts on this page:** 14\
**Page:** 1

<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:** [May 14, 2018, 2:03am UTC](https://forum.katalon.com/t/getting-chromedriver-log-when-you-run-record-spy-web-to-investigate-why-ks-failed-to-start-chrome/10886/1 "2018-05-14T02:03:19Z")

</div>

# Background

In the Katalon Forum you can find many posts where people had problem activating Google Chrome browser from Katalon Studio. In most cases the discussion tends to fall unproductive due to lack of enough information(diagnostic) what’s going on between Katalon Studio and Chrome browser.

- [Unable to launch test suite with chrome 66.0.3359.170 64 Bits](http://forum.katalon.com/t/unable-to-launch-test-suite-with-chrome-66-0-3359-170-64-bits/10870)

- [Unable to open browser with url: Unable to open browser with url:](http://forum.katalon.com/t/unable-to-open-browser-with-url-unable-to-open-browser-with-url/8876)

- [Record Web: Browser binaries not found](http://forum.katalon.com/t/record-web-browser-binaries-not-found/8319)

- [Unknown error: cannot find Chrome binary](http://forum.katalon.com/t/unknown-error-cannot-find-chrome-binary/9008)

- [Google Chrome crashed on my PC --- 2 reasons found](http://forum.katalon.com/t/google-chrome-crashed-on-my-pc-2-reasons-found/10312)

and more…

# chromedriver.log file

Katalon Studio executes the [chromedriver](https://sites.google.com/a/chromium.org/chromedriver/) in order to open Google Chrome browser. Chromedriver can write logs. The [documentation](https://sites.google.com/a/chromium.org/chromedriver/logging) tells you how to enable chromedriver logging.

Let me show you a fragment of a chromedirver.log file here: this shows the command line to start chrome.exe. In other words you can see in detail how Katalon Studio tried to start and communicate with the Chrome browser:

```auto
[1526012674.637][INFO]: Launching chrome: "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-background-networking --disable-client-side-phishing-detection --disable-default-apps --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --disable-web-resources --enable-automation --enable-logging --force-fieldtrials=SiteIsolationExtensions/Control --ignore-certificate-errors --load-extension="C:\Katalon_Studio_Windows_64-5.4.1\configuration\resources\extensions\Chrome\Object Spy,C:\Users\username\AppData\Local\Temp\scoped_dir10832_12653\internal" --log-level=0 --metrics-recording-only --no-first-run --password-store=basic --remote-debugging-port=12067 --test-type=webdriver --use-mock-keychain --user-data-dir="C:\Users\username\AppData\Local\Temp\scoped_dir10832_25782" data:,

```

Please find a example chromedriver.log file attached to this post where you can find what level of detail is available.

[sample chromedriver.log](https://s3.amazonaws.com/katalon-forum/editor/8b/lv28x3sfp9x6.log)

# Problem to solve

If I want to get chromedriver.log when I run a Test Case, I can enable chromedriver’s logging feature by setting JVM System Property `webdriver.chrome.logfile` as follows:

```auto
System.setProperty('webdriver.chrome.logfile', "C:/temp/chromedriver_TC1.log")
WebUI.openBrowser('')
// execute some steps
WebUI.navigateToUrl('http://demoaut.katalon.com')
WebUI.verifyElementPresent(findTestObject("Page_CURA Healthcare Service/a_Make Appointment"), 20)
// close the browser
WebUI.closeBrowser()

```

Provided with this level of detail diagnostics, the discussions in the Katalon Forum regarding failures around Chrome browser could be more productive.

OK, this works fine when I run a Test Case.

However, **how can I get the chromedriver.log file when I use the Record/Spy Web features?** Because in Record/Spy Web, I have no chance to write Groovy script to set Java VM System Property.

# Solution

In the directory where you installed the Katalon Studio, you will find a file named `katalon.ini`. In this file a few arguments are written which are passed to the Java VM for the Katalon Studio. I tried sightly modify the `katalon.ini` as follows:

In the `%KATALON\_STUDIO\_INSTALLED_FOLDER%\\katalon.ini`

```auto
-startup
plugins/org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.401.v20161122-1740
-data
config
-vmargs
-Xms256m
-Xmx4048m
-Dwebdriver.chrome.logfile=C:/temp/chromedriver.log

```

You can specify any folder for chromedriver.exe to output the log. `C:\temp` is just an example.

You need to create the output folder for the log (`C:\temp`) manually before you execute your Katalon  
test.

Please note the very last line above. With -D argument I could specify a JVM System Property `webdriver.chrome.logfile` which is effective even when I run the Record/Spy Web features.

This worked fine for me. I could get chromedriver.log file for Record/Spy Web as well as Test Cases.

# Please bear it in mind that …

The `katalon.ini` file seems to be very fragile. If you make any mistake in `katalon.ini`, unpredictable erros may occur. For example, I experienced a problem when I wrote as follows:

```auto
-Dwebdriver.chrome.logfile="C:/temp/chromedriver.log"

```

Beware, the double quotations around the file path made katalon.exe crasy.

Also you should be aware that the Katalon Official document does not cover ‘katalon.ini’ file. Presumably they do not like users to touch this at all. This is why I put this post into the “tricks” category 😛 .

Hope this helps.

---

<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:** [May 14, 2018, 2:12am UTC](https://forum.katalon.com/t/getting-chromedriver-log-when-you-run-record-spy-web-to-investigate-why-ks-failed-to-start-chrome/10886/2 "2018-05-14T02:12:20Z")

</div>

Append the following line to the katalon.ini file,

```auto
-Dwebdriver.firefox.logfile=C:/temp/firefoxdriver.log

```

then you will get the log how Katalon Studio tried to start and communicate with Firefox 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:** [May 14, 2018, 4:07am UTC](https://forum.katalon.com/t/getting-chromedriver-log-when-you-run-record-spy-web-to-investigate-why-ks-failed-to-start-chrome/10886/3 "2018-05-14T04:07:19Z")

</div>

Correction:

I tried appending “ **-Dwebdriver.firefox.logfile=C:/temp/firefoxdriver.log** ” to katalon.ini. It seems not working now. Curious. I seem to remember it worked for me last friday. But not now …

---

<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:** [May 17, 2018, 2:34am UTC](https://forum.katalon.com/t/getting-chromedriver-log-when-you-run-record-spy-web-to-investigate-why-ks-failed-to-start-chrome/10886/4 "2018-05-17T02:34:15Z")

</div>

One more correction:

I changed my `%KATALON\_STUDIO\_INSTALLED_FOLDER%\\katalon.ini` file as follows:

```auto
-startup
plugins/org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.401.v20161122-1740
-data
config
-vmargs
-Xms256m
-Xmx4048m
-Dwebdriver.chrome.logfile=C:/temp/chromedriver.log
-Dwebdriver.firefox.logfile=C:/temp/firefoxdriver.log

```

And in the command line I did the following:

```auto
$ cd %KATALON_STUDIO_INSTALLED_FOLDER%
$ eclipsec.exe -clean

```

A window of Katalon Studio opened. Soon I closed it. Then, I started Katalon Studio as usual (by clicking desktop icons etc).

I did Record/Web Spy/Run TestCase using Chrome browser.  
I got C:/temp/chromedriver.log file.  
I did Record/Web Spy/Run TestCase using Firefox Browser.  
I got C:/temp/firefoxdriver.log file as well.

“$ **eclipsec.exe -clean** ” operation is necessary in order to clean the internal cache of Eclipse, and make my change in the katalon.ini file effective.

---

<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:** [May 18, 2018, 4:34am UTC](https://forum.katalon.com/t/getting-chromedriver-log-when-you-run-record-spy-web-to-investigate-why-ks-failed-to-start-chrome/10886/5 "2018-05-18T04:34:31Z")

</div>

I want to confirm if the system properties I specified in the katalon.ini file are really accepted by Katalon Studio. How can I check it? ---- Katalon Studio provides enough tools. Let me show you how.

In the tool bar of Katalon Studio, you want to navigate Help \> About.  
 ![](https://s3.amazonaws.com/katalon-forum/editor/r9/loqcqwr17yi8.png "Image: https://s3.amazonaws.com/katalon-forum/editor/r9/loqcqwr17yi8.png")

Dialog “About Katalon Studio” appears.  
 ![](https://s3.amazonaws.com/katalon-forum/editor/s7/3gxu40witomk.png)

Click “Installation Details” button. Then Another dialog “Katalon Studio Installation Details” appears.  
 ![](https://s3.amazonaws.com/katalon-forum/editor/y8/uy54bieigrxc.png)

In this dialog, System properties acknowledged by Katalon Studio are listed. The list includes lines I specified in the katalon.ini file.

![](https://s3.amazonaws.com/katalon-forum/editor/ys/h7ne5gqm2khh.png)

In the above screenshot you can see I put the following lines in the katalon.ini file:

```auto
-Dwebdriver.chrome.logfile=C:/temp/chromedriver.log
-Dwebdriver.firefox.logfile=C:/temp/firefoxdriver.log
-Dhttp.proxyHost=172.24.2.10
-Dhttp.proxyPort=8080
-Dhttps.proxyHost=172.24.2.10
-Dhttps.proxyPort=8080

```

In the “Katalon Studio Installation Details” dialog you find a button “View Error Log”. By clicking this button you can see the log of Katalon Studio.  
 ![](https://s3.amazonaws.com/katalon-forum/editor/1q/oz6qzl3s6t7l.png)

I happened to find an interesting message in the Katalon Studio log.

```auto
!MESSAGE System property http.proxyHost has been set to 172.24.2.10 by an external source. This value will be overwritten using the values from the preferences

```

This means that the system property “http.proxyHost” which I specified in the katalon.ini file was once read, but it will be overritten using the values from the “Katalon Studio Preferences \> Proxy”. Well, well, …

[Help\_About.png](https://s3.amazonaws.com/katalon-forum/editor/r9/loqcqwr17yi8.png)

[InstallationDetails.png](https://s3.amazonaws.com/katalon-forum/editor/s7/3gxu40witomk.png)

[ConfigurationDetails.png](https://s3.amazonaws.com/katalon-forum/editor/y8/uy54bieigrxc.png)

[ConfigurationDetails\_2.png](https://s3.amazonaws.com/katalon-forum/editor/ys/h7ne5gqm2khh.png)

[http.proxyHostWillBeOverwritten.png](https://s3.amazonaws.com/katalon-forum/editor/1q/oz6qzl3s6t7l.png)

---

<div class="post-metadata">

**Author:** ![Alex8](https://avatars.discourse-cdn.com/v4/letter/a/65b543/32.png) [@Alex8](https://forum.katalon.com/u/Alex8)\
**Post date:** [July 6, 2018, 8:16am UTC](https://forum.katalon.com/t/getting-chromedriver-log-when-you-run-record-spy-web-to-investigate-why-ks-failed-to-start-chrome/10886/6 "2018-07-06T08:16:01Z")

</div>

@[@4280-kazurayam](http://forum.katalon.com/profile/4280/kazurayam "Link: http://forum.katalon.com/profile/4280/kazurayam"), do you have an idea on how to configure the same (browser log file creation), but for Remote execution, not for local execution.  
Means the problem is if I set the path as “C:/browser\_logs/chrome.log” the script interprets is as a local machine folder and will write the log only if browser instance is created on a LOCAL machine.  
That’s my understanding.

---

<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:** [July 8, 2018, 10:02am UTC](https://forum.katalon.com/t/getting-chromedriver-log-when-you-run-record-spy-web-to-investigate-why-ks-failed-to-start-chrome/10886/7 "2018-07-08T10:02:34Z")

</div>

> do you have an idea on how to configure the same (browser log file creation), but for Remote execution, not for local execution.

If you are running the remote sever for yourslef and you can log into the Remote Selenium server with high-profiled user, then you should be able to read the log on the remote machine with ssh/scp commands.

Do you want to get access to the webdriver’s log on a Remote Selenium Server using Katalon Stuido’s test case script? I am negative. I think that the Selenium WebDriver API does not support feature of transporting the remote drivers’ log to the WebDrvier clients.

---

<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:** [July 8, 2018, 10:06am UTC](https://forum.katalon.com/t/getting-chromedriver-log-when-you-run-record-spy-web-to-investigate-why-ks-failed-to-start-chrome/10886/8 "2018-07-08T10:06:08Z")

</div>

As for Remote Driver, the following post might be interesting for you:

> **[Katalon Studio behind Proxy is unable to open browser on BrowserStack](http://forum.katalon.com/discussion/5873/katalon-studio-behind-proxy-is-unable-to-open-browser-on-browserstack)**
>
> \## OS : Windows 7   ## Katalon Studio Version : 5.3.1 ## Katalon Studio logs:  Windows (\\config\\.metadata\\.log) is attached

---

<div class="post-metadata">

**Author:** ![ze2](https://avatars.discourse-cdn.com/v4/letter/z/4bbf92/32.png) [@ze2](https://forum.katalon.com/u/ze2)\
**Post date:** [May 10, 2019, 7:53pm UTC](https://forum.katalon.com/t/getting-chromedriver-log-when-you-run-record-spy-web-to-investigate-why-ks-failed-to-start-chrome/10886/9 "2019-05-10T19:53:53Z")

</div>

@kazurayam  
I was playing with your git test project to familiarize myself with some of the features I’ve been curious about.

My question is where does Katalon specify the location of Chromedriver - or is it expecting some default location?

I am getting :  
05-10-2019 03:48:57 PM Test Cases/Login Test Case

Elapsed time: 1.015s

Test Cases/Login Test Case FAILED.  
Reason:  
com.kms.katalon.core.exception.StepFailedException: Unable to open browser with url: ’ ’  
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:64) . . . . .  
I tried to turn on logging with a system.setproperty(“Prop”,“val”) like you specified and I get no joy. No records get written to the logger. Let me know if you have any pointers

---

<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:** [May 10, 2019, 9:55pm UTC](https://forum.katalon.com/t/getting-chromedriver-log-when-you-run-record-spy-web-to-investigate-why-ks-failed-to-start-chrome/10886/10 "2019-05-10T21:55:02Z")

</div>

> [@ze2](#):
>
> where does Katalon specify the location of Chromedriver

On my Mac,  
`/Applications/Katalon Studio.app/Contents/Eclipse/configuration/resources/drivers/chromedriver_mac/chromedriver`

On Windows, you can find the directory named `configuration` in the directory where you deployed the distributable of Katalon Studio.

Please read the implementation code of `getChromeDriverPath() ` method of the `com.kazurayam.webdriverfactory4ks.ChromeDriverFactory` class  
[https://github.com/kazurayam/webdriverfactory4ks/blob/master/Keywords/com/kazurayam/webdriverfactory4ks/ChromeDriverFactory.groovy](https://github.com/kazurayam/webdriverfactory4ks/blob/master/Keywords/com/kazurayam/webdriverfactory4ks/ChromeDriverFactory.groovy) line#240

---

<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:** [May 10, 2019, 10:04pm UTC](https://forum.katalon.com/t/getting-chromedriver-log-when-you-run-record-spy-web-to-investigate-why-ks-failed-to-start-chrome/10886/11 "2019-05-10T22:04:17Z")

</div>

The code of `com.kazurayam.webdriverfactory4ks.ApplicationInfo` class at [https://github.com/kazurayam/webdriverfactory4ks/blob/master/Keywords/com/kazurayam/webdriverfactory4ks/ApplicationInfo.groovy](https://github.com/kazurayam/webdriverfactory4ks/blob/master/Keywords/com/kazurayam/webdriverfactory4ks/ApplicationInfo.groovy) will show you the following.

On Windows, you will find %HOME%.katalon\application.properties file. In the file, the first line would be, for example:

```auto
#C:\Katalon_Studio_Windows_64-5.10.1

```

This denotes where you deployed the distributable of Katalon Studio.

On Mac, Katalon Studio’s app will be deployed at `/Applications/Katalon Studio.app`. This path is fixed.

* * *

Please be aware I am not a member of Katalon developers. I don’t know the spec. I just found the above facts. I could be wrong. Don’t blame me.

---

<div class="post-metadata">

**Author:** ![ze2](https://avatars.discourse-cdn.com/v4/letter/z/4bbf92/32.png) [@ze2](https://forum.katalon.com/u/ze2)\
**Post date:** [May 12, 2019, 11:22pm UTC](https://forum.katalon.com/t/getting-chromedriver-log-when-you-run-record-spy-web-to-investigate-why-ks-failed-to-start-chrome/10886/12 "2019-05-12T23:22:06Z")

</div>

Yeah I found the location of the Katalon folder, I just didn’t know it expected Chromedriver to be in the drivers folder. I have Chrome driver for my IntelliJ configuration and I want to simply point Katalon to my Chromedriver in my IntelliJ deployment instead of having a duplicate copy in Katalon. Let me know if you know where to specify the location, I think I saw another of your posts where you added some start-up preferences to Katalon. I’m gonna look for it and see if I can rig it to simply pick my current setting. If all else fails I’ll dump another copy in the Katalon\drivers folder. And I understand you are not part of the Katalon Dev team, am cool. You’ve demonstrated better comprehension of the architecture than me and thats enough. Thanks again.

---

<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:** [May 13, 2019, 12:15am UTC](https://forum.katalon.com/t/getting-chromedriver-log-when-you-run-record-spy-web-to-investigate-why-ks-failed-to-start-chrome/10886/13 "2019-05-13T00:15:39Z")

</div>

> [@ze2](#):
>
> I have Chrome driver for my IntelliJ configuration and I want to simply point Katalon to my Chromedriver in my IntelliJ deployment instead of having a duplicate copy in Katalon.

OK.

See line#70-71 of [https://github.com/kazurayam/WebDriverFactory4ks/blob/master/Keywords/com/kazurayam/ks/webdriverfactory/chrome/ChromeDriverFactoryImpl.groovy](https://github.com/kazurayam/WebDriverFactory4ks/blob/master/Keywords/com/kazurayam/ks/webdriverfactory/chrome/ChromeDriverFactoryImpl.groovy)

You can tell Katalon Studio to use the chromedriver.exe of your choice by specifying the System property `webdriver.chromee.driver`:

```auto
import java.nio.file.Path
import java.nio.file.Paths
...
Path chromeDriverPath = Paths.get("path of chrome driver for your IntelliJ configuration")
System.setProperty('webdriver.chrome.driver', chromeDriverPath.toString())

```

---

<div class="post-metadata">

**Author:** ![ze2](https://avatars.discourse-cdn.com/v4/letter/z/4bbf92/32.png) [@ze2](https://forum.katalon.com/u/ze2)\
**Post date:** [May 14, 2019, 2:57pm UTC](https://forum.katalon.com/t/getting-chromedriver-log-when-you-run-record-spy-web-to-investigate-why-ks-failed-to-start-chrome/10886/14 "2019-05-14T14:57:57Z")

</div>

Perfect homie! And a simple solution as always. I was looking to hoist the request during setup/initialization but this works for the majority of my concerns.
