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.
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 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:
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.
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.