i don’t understand the question.
it is about sending a certain http request (api call) and parse the response, or it is about loading a webpage and capture all api calls under the hood of the webbrowser?
but let’s wait for @rakesh.m input
Usecase : in testscript execution at some point there is a save operation where an api is triggered to save the details. We need to capture that api response and use its parameters in next steps for data validation.
If this is the case, the URL of the endpoint is hidden somewhere in the web user interface on browser. The URL will not be exposed to users. @rakesh.m would never know the URL. Therefore he would not be able to make the API call using Katalon’s WS API.
This difficulty might be resolved by CDP Network feature, like this:
Of course, CDP requires a serious custom programming efforts. You need to be highly skilled. Katalon Studio provides no support for it.
Perfect Understanding. but the thing while im running the tests, if i could capture those https requests/responses from network tab then it would be very useful for me to validate through api’s as we tried doing via web but its relatively slower and it takes more time for validation.
@rakesh.m sorry for late reply, was a bit busy those days …
Well, now I understand what do you need.
You can follow the path proposed by @kazurayam … or show us what you tried with mobproxy and where did you failed.
Mobroxy it is used under the hood by Katalon to intercept API responses as .har files when doing Webservice tests, as far as I know.
So, most of the needed libraries should be already present.
Of-course, the code sample there have to be adapted to Katalon …
Unfortunately, I am very rusty with WebUI testing (and with testing in general, at my current work I am doing different stuff now) …
But, if you show us your code, and what failures you have, perhaps somebody more ‘up-to-date’ and more patient from the community can help you, e.g Kazu or @Russ_Thomas
For now, focus on just getting a .har file to be generated when you navigate to a certain page.
How to parse it and extract the data needed … later. Although the har file is just a json, such tend to be very large with WebUI tests, depending on the resources loaded by your AUT, compared with .har files generated by API calls with Webservice testing.