Web Recorder New Chrome browser always starting at "Data:," with a Roaming profile


Trying to record a testcase from the Web Recorder using a new Chrome browser always opens it at “Data:,” and then claims the browser closes, even though it doesn’t. Connecting to an active Chrome browser does work.

This is actually the same problem as Initial setup: ChromeDriver DevToolsActivePort file doesn't exist and you can find information about our environment there.

Eventually we figured out that the problem was caused by our organization using a roaming configuration for Chrome which prevented --user-data-dir from making changes: [Policy List]

Since the ChromeDriver depends on creating a unique user data directory to communicate with with each Chrome browser, Katalon could not control the browser once it started.

If we couldn’t change Chrome’s data dir, we made ChromeDriver use the default roaming profile instead:

import org.openqa.selenium.WebDriver as WebDriver
import org.openqa.selenium.chrome.ChromeDriver as ChromeDriver
import com.kms.katalon.core.webui.driver.DriverFactory as DriverFactory
import org.openqa.selenium.chrome.ChromeOptions asChromeOptions

// **** NOTE: Must only have one Chrome browser open at a time ****
ChromeOptions options = new ChromeOptions()
options.addArguments(('user-data-dir=C:/Users/' + System.getProperty('user.name')) + '/AppData/Roaming/Google/Chrome/User Data')

WebDriver driver = new ChromeDriver(options)

This worked for running testcases in Chrome, but we had create our own “openBrowser” to allow testcases to be run on different browsers, and we could not find a way to get Web Recorder to start Chrome with this fix. Finally we added:

--user-data-dir=C:/Users/>>>user name<<</AppData/Roaming/Google/Chrome/User Data

into Project Settings > Desired Capabilities > Web UI > Chrome args list BUT this requires the tester’s actual user name be manually configured for each person.

SO the actual questions are:

  1. Is there a ChromeDriver option that stops it from creating is own user data directory and just use the default instead (avoiding the whole problem)

  2. Or, is there at least a way to add Windows’ %USERNAME% environment variable to the Chrome Web UI args property list?
    This is how we solved the problem in another test framework, but we haven’t been able to find the magic combination of characters to make this work in Katalon

Thank-you very much!


The same happens on Ubuntu Linux