Chrome DevTools Protocol Integration

This is a companion discussion topic for the original entry at

I’m seeing an error in a previously functional test that attempts to set chrome into an ‘offline’ mode using the Katalon provided plugin Chrome DevTools Protocol Integration.

It looks like an update in Chrome has broken this plugin. The tests are failing when calling CdpUtils.getService() and below is my code followed the by the stack trace of the error. Can someone investigate as this is critical functionality for our test suite?

	def goOffline() {
		ChromeDevToolsService cdts = CdpUtils.getService()

		cdts.getNetwork().emulateNetworkConditions(true, 0, 0, 0)

		WebUI.waitForElementVisible(findTestObject('Pages/AuditsV2/T_Offline'), 10)
=============== ROOT CAUSE =====================
Caused by: Failed connecting to tab web socket.

For trouble shooting, please visit:

04-06-2023 10:14:56 AM com.radar.katalon.OfflineHelper.goOffline()

Elapsed time: 0.859s

Test Cases/UserJourneys/AuditsV2/GoOffline FAILED.
com.kms.katalon.core.exception.StepErrorException: Failed connecting to tab web socket.
	at com.kms.katalon.core.main.CustomKeywordDelegatingMetaClass.throwError(
	at com.kms.katalon.core.main.CustomKeywordDelegatingMetaClass.invokeStaticMethod(
	at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(
	at com.kms.katalon.core.main.TestCaseExecutor.runScript(
	at com.kms.katalon.core.main.TestCaseExecutor.doExecute(
	at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(
	at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(
	at com.kms.katalon.core.main.TestCaseExecutor.execute(
	at com.kms.katalon.core.main.TestCaseMain.runTestCase(
	at com.kms.katalon.core.main.TestCaseMain.runTestCase(
	at com.kms.katalon.core.main.TestCaseMain$runTestCase$ Source)
Caused by: Failed connecting to tab web socket.
	at$createDevToolsService$ Source)
	at com.katalon.cdp.CdpUtils.getService(CdpUtils.groovy:50)
	at com.katalon.cdp.CdpUtils$ Source)
	at com.radar.katalon.OfflineHelper.goOffline(OfflineHelper.groovy:30)
	at com.radar.katalon.OfflineHelper.invokeMethod(OfflineHelper.groovy)
	at com.kms.katalon.core.main.CustomKeywordDelegatingMetaClass.invokeStaticMethod(
	... 11 more
Caused by: Failed connecting to ws server {}
	... 19 more
Caused by: javax.websocket.DeploymentException: Handshake error.
	at org.glassfish.tyrus.client.ClientManager$3$
	at org.glassfish.tyrus.client.ClientManager$
	at org.glassfish.tyrus.client.ClientManager$SameThreadExecutorService.execute(
	at org.glassfish.tyrus.client.ClientManager.connectToServer(
	at org.glassfish.tyrus.client.ClientManager.connectToServer(
	... 22 more
Caused by: org.glassfish.tyrus.core.HandshakeException: Response code was not 101: 403.
	at org.glassfish.tyrus.client.TyrusClientEngine.processResponse(
	at org.glassfish.tyrus.container.grizzly.client.GrizzlyClientFilter.handleHandshake(
	at org.glassfish.tyrus.container.grizzly.client.GrizzlyClientFilter.handleRead(
	at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(
	at org.glassfish.grizzly.ProcessorExecutor.execute(
	at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(
	at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$

Hi, did you ever get a fix for this? I now need to be able to use .getService() now and am getting the same error

I eventually got this working so there isn’t an issue with the plugin. I think I might have gotten it working by adding --remote-allow-origins=* to the args of Chrome. Here is my current setup:

Thanks for the reply. Unfortunately I have already tried this and it didn’t work for me, I still get ‘HandshakeException: Response code was not 101: 403’
I’ll carry on trying other things.

You are right. Chrome v111, which was released at Mar 2023, caused the kklisura/chrome-devtools-java-client does not work any longer. See their issues

This issue is still open, not resolved yet. Their latest release v4.0.0 kklisura/chrome-devtools-java-client was dated at May 2021, which is 2 years ago. They have released no updates since then.

The jar of Katalon’s Chrome DevTools Protocol integration includes the kklisura’s classes that are compiled dated at Nov-2019, possibly of v2.1.0 which is even older.

Therefore the plugin would no longer work with Chrome v111 and newer.

If anybody wants the Chrome DevTools Protocol Integration for Katalon Studio to revive, he/she should contribute to their issue so that the kklisura’s library can work with Chrome v111 and newers.

Once done, he/she can use the kklisura’s library directly. They can bring the upgraded jar into the Drivers folder, and their test case can call the native API of kklisura’s library. He/she does not have to wait for the Katalon’s plugin to be updated.

Selenium 4 has supported Chrome DevTools Protocol.

Therefore, I guess, there would not be many who demands the kklisura’s library any longer.

As far as I am aware, Katalon Studio is not going to move toward Selenium 4.

If you seriously demands Chrome DevTools Protocol for your testings, you should look at Playwright which works on CDP natively.

I think that Katalon Store should announce that the plugin is deprecated. Otherwise more people would get confused.


There is a fix for it: Enhancing Your Automated Testing with Chrome DevTools in Katalon Studio - Testsmith