How to parse and extract data from HTML response for Rest API?

Hi,

Is there any way to parse and extract data from HTML response for Rest API request?

yes.
getResponseBodyContent() or getResponseBodyText() will just return a string with all the content.
if you need to extract something specific from the html … well, that’s another story.
you will need a custom parser, depending on the response content

Hi,


Please find the attached screenshot for reference (postman response).

I want to extract the value for “__VIEWSTATE”

How should I parse this html response and get value for “__VIEWSTATE” ?

jsoup may help, give it a try:

Yes, I have tried jsoup and it is working for me. Thanks

@Aalok could you share your code on how you handle it on katalon using jsoup?