Handle Response Messages


#1

This is a companion discussion topic for the original entry at https://docs.katalon.com/katalon-studio/docs/handle-response-messages.html

#2

In the api testing, I need to verify the response , response contains n number of collections like n number of user details(each user have multiple fields) , so that I need to verify each persons age (I need to verify the age is 25) so that is there any way to traverse through each user to check weather the age is 25 or not( I need to implement loop concepts and I have to pass the iteration value to the response array), is there any way to implement this scenario?


#3

there may be many solutions: a recursive function to parse the response, json schema validation …
some discussions on this matter here:


#4

how to use getResponseText() function
pls help me out

getResponseText is not present in keywords browser


#5

You can use it in Script mode.

ResponseObject ro = WS.sendRequest(findTestObject("my/api/object"))
String response = ro.getResponseText()

#6

thank you , it worked


#7

Is there a way instead of using Element locator , I just want to comb the whole response to fined a value.


#8

I’m not sure what you were asking for.


#10

getResponseText() is not supporting for Katalon 5.7 version…plz suggest some alternative to get the text


#11

getResponseBodyContent()


#13

What does “not working” mean?