Forum Discussion
SiKing
Community Expert
As an XPath assertion
As a Script assertion
exists(//*:State[text()='CA'] | //*:State[text()='AZ'] | //*:State[text()='OR'] | //*:State[text()='MA'])
As a Script assertion
def state = context.expand('${' + context.currentStep.name + '#ResponseAsXml#//*:State}')
assert ['CA', 'AZ', 'OR', 'MA'].contains(state)
aedahh
8 years agoNew Contributor
Hello, newbie to soapui here...
The answers provided seem to be for response content that is XML only not JSON, is this correct?
How would assert for contains multiple values on a json response that is something like this:
{
"result": true,
"content": [
"abc",
"def",
"ijk",
[... <more content>...]
]
}
Thanks
Related Content
Recent Discussions
- 3 seconds ago
- 14 hours ago