in the verification by providing:
WS.verifyElementPropertyValue(response, ‘role’, ‘Candidate’)
with the response in body:
POST
/signIn
HTTP 200 OK
Content-Type:
application/json
{
"customToken": "fefqwfwqwfqwfqwfqwfqwf",
"role": "Candidate",
"action": "GET"
}
I return the json inside an html and the log responds to me:
Verification FAILED.
Reason:
com.kms.katalon.core.exception.StepFailedException: Unable to verify element property value (Root cause: groovy.json.JsonException: Unable to determine the current character, it is not a string, number, array, or object
Try WS.verifyElementPropertyValue(response, '[0].role', 'Candidate')
Thank you for your answer, but it’s still failing:
2019-07-31 09:42:48.911 DEBUG testcase. - 6: verifyElementPropertyValue(response, “[0].role”, “Candidate”)
2019-07-31 09:42:48.955 ERROR c.k.k.core.keyword.internal.KeywordMain - Unable to verify element property value (Root cause: groovy.json.JsonException: Unable to determine the current character, it is not a string, number, array, or object
I too am experiencing the above:
TestCase: WS.verifyElementPropertyValue(var, ‘results[2].name’, ‘Chewbacca’)
com.kms.katalon.core.exception.StepFailedException: 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
Your solution did not match my issue; I’m switching back to junit for ease of instructions. Thanks anyways.