Unable to get value from xml (response)

Hi All, please help.
I am stuck when testing my rest API

step:

  1. Send request using POST method
  2. Verify element text with input:
    response: response
    locator: transactionInfo[1].isTransExist
    text: 1

Issue:
When I try to verify element text in step 2 I got the error like below:
Test Cases/APITest/TC02_MVA Inquiry FAILED because (of) Unable to verify element text (Root cause: groovy.json.JsonException: Unable to determine the current character, it is not a string, number, array, or object

The current character read is ‘<’ with an int value of 60
Unable to determine the current character, it is not a string, number, array, or object
line number 1
index number 0

<?xml version="1.0"?>4xxxxx

^)

Q: Anyone know what the cause? Is imy locator in right format?

Hi, friska:

I have met the same issue as you do… I notice it has something to do with responseContentBoday.

If you have any progress on this, please share it to me.

Thanks in advance.

The exception showed Json Exception while the response looks like xml.
Could you paste the structure of the expected response if it works correctly?

The topic is closed due to inactiveness. Feel free to open a new one if you have any concerns.

Hey ,
Can any one tell me that how can i use XML response values of one api in katalon to run another api.

When i print my response i find error like -
he current character read is ‘<’ with an int value of 60
Unable to determine the current character, it is not a string, number, array, or object
line number 1
index number 0

<?xml version=“1.0”?>4xxxxx

^)

1 Like