Groovy:unable to resolve class com.katalon.cdp.CdpUtils error

Information:
Katalon Version = 10.0.0
Chrome version Version 133.0.6943.54
I’ve installed the plugin listed here Intercepting request with Chrome Devtools Protocol
Some of the imports I’m using are:
import org.openqa.selenium.devtools.v85.log.Log
import org.openqa.selenium.devtools.v85.network.Network;
import org.openqa.selenium.devtools.v85.page.Page;
import com.github.kklisura.cdt.services.ChromeDevToolsService
import org.openqa.selenium.devtools.DevTools;
import com.katalon.cdp.CdpUtils

I’m attempting to open developer’s tool and copy response from Network tab, I obtained some code from the link above; However I’m unable to proceed due to error of import file ‘Groovy:unable to resolve class com.katalon.cdp.CdpUtils’

What am I missing? I have tried utilizing v133 for logs, network, and page, but none of these versions are compiling. The only version that functions correctly is v85.

Please help!

1 Like

I guess as follows (though I have not experimented at all).

The article Intercepting request with Chrome DevToolsProtocol uses the Katalon’s plugin katalon-sutuido-chrome-devtools-protocol-plugin. The build.gradle of the plugin has the following line:

dependencies {
  compile 'com.github.kklisura.cdt:cdt-java-client:2.0.0'
}

The 2.0.0 of this jar is old (dated 2019). On the other hand, the kklisura/chrome-devtools-java-client has been updated up to v4.0 (May 2021, old enough!).

This means that Katalon has left their plugin project very old — Possibly they are no longer interested in it.


I think that @mqamar should NOT touch the Chrome DevTools Protocol Integration plugin because it is out of date already.

I think that Katalon should deprecate this plugin (turn the GitHub reporistory from public to private) if Katalon is no longer maintaining it.

Thank you for the reply.
If not this approach then do you know any other way to open developer’s tool and copy response from Network tab,

Thanks

Selenium 4 supports Chrome DevTools Protocol (CDP) natively.

Katalon Studio v10 works on top of Selenium4.

So there could be some path in KS v10 to make use of CDP natively. But I haven’t tried it. I have no more idea.

@vu.tran
@Elly_Tran

Any comment from Katalon?


I have a doubt about the design of KS for Selenium 4 CDP support. As @mqamar already knows, the Selenium API is sensitive about the CDP Specification version. You can find v85 in the package name:

import org.openqa.selenium.devtools.v85.log.Log
import org.openqa.selenium.devtools.v85.network.Network;
import org.openqa.selenium.devtools.v85.page.Page;

Due to this design, when you switch the version of Chrome browser to use, possibly you have to modify the test script (switch v85 to soming else), and resolve the required dependencies (switch the jar) appropriately.

The problem is, I believe, that Katalon Studio would not manage upgrading the dependency automatically; you would need to resolve it manually somehow. This architecture is fragile. Personally I do not like to touch such system. So I won’t use KS and Selenium 4 to utilize the CDP features.

1 Like

Playwright by Microsoft natively runs on the Chrome DevTools Protocol, provides the API to monitor and modify the browser network traffic. Seasoned skill of programming in JavaScript/TypeScript is required.

I have ever touched this. I found it is nicely designed, works stable, is easy to use.


Puppeteer also runs on the CDP, provides the API to monitor and modify the browser network traffic.

I haven’t touch it, but I know many people highly appraise it. It is a product by Google people! It would be best reliable.


Both of Playwright and Puppeteer runs on Node.js with support of npm, Node Package Manager which automatically resolves the version of external dependencies. Npm frees us from the complexed dependency management, of which KS is not capable.

If you just want to save the HTTP Request messages and HTTP Response messages into a local file, you don’t need CDP. Browser MobProxy will enable you to do that.

See the folllowing of mine:

sequence diagram

Thank you for the replies. I only need to save the response to a file. Let me try ‘Browser MobProxy’ approach you suggested

1 Like

Hi @mqamar,

Can you please let us know if any suggestion works for you? Thank you