Forum Discussion

AngieD18's avatar
7 months ago

Script Assertion XPath: Is it possible to verify multiple tags and verify multiple fields

Hi soapUI Wizards,

I have two questions:


My response has an acceptedStatus object with two tags:






  1.  Can I verify that the two tags are returned, spelled properly, and are in the right order.  Is this possible with a XPath Query Script Assertion, or should I use a Groovy Script?  I tried XPath Match, but that matches the entire response.  Can I use that to match just a section of the response?


  1. Can I also verify multiple contents in a single XPath Query Script?  In the same acceptedStatus object, now I want to verify the contents.  Right now, I can check one value.  Can I check two values in a single XPath Query Script Assertion?

This is my XQuery Path script assertion:

declare namespace wsse='';

declare namespace ec='';

declare namespace soap='';

declare namespace ns2='';

declare namespace ds='';

declare namespace wsu='';



This returns the value of the acceptedDate.  I've tried changing the namespace defintion, but without luck.


Thank you for your help.


No RepliesBe the first to reply