I have json elements like
“created-by”: “abc”,
“updated-by”: “xyz”
When I use
WS.verifyElementPropertyValue(response, ‘[0].updated-by’, ''xyz")
I get Verification FAILED
Reason:
com.kms.katalon.core.exception.StepFailedException: Unable to verify element property value (Root cause: Variable ‘by’ is not defined for test case.)
and when i use
WS.verifyElementPropertyValue(response, ‘[0][“updated-by”]’, ‘xyz’)
i get
Unable to verify element property value (Root cause: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script1.groovy: 1: unexpected token: [ @ line 1, column 93.
** rseText(jsonText);return root.[0]["updat**
Can someone help me with this?
I know its better not to have hyphens in the elements all together, but for now what should be done when there is a hyphen in the element name?