RobWithers
12 years agoOccasional Contributor
How to assert an element in a SOAP response list?
I am getting a soap response, which includes the following fragment. How can I specify an assertion for a particular element of the list, without a guarantee of the order the response list is in? So, for instance, let us say the RAF_Intro element is sometimes the 2nd element and sometimes the 5th element. Thanks!
<lookupPageContentHeadersOutput>
<contentList>
<content>
<contentSID>111</contentSID>
<contentId>RAF_Mail</contentId>
<contentStatus>DEPLOYED</contentStatus>
</content>
<content>
<contentSID>110</contentSID>
<contentId>RAF_Intro</contentId>
<contentStatus>DEPLOYED</contentStatus>
</content>
<content>
<contentSID>109</contentSID>
<contentId>RAF_Email</contentId>
<contentStatus>DEPLOYED</contentStatus>
</content>
<content>
<contentSID>112</contentSID>
<contentId>RAF_Disclosures</contentId>
<contentStatus>DEPLOYED</contentStatus>
</content>
</contentList>
</lookupPageContentHeadersOutput>
<lookupPageContentHeadersOutput>
<contentList>
<content>
<contentSID>111</contentSID>
<contentId>RAF_Mail</contentId>
<contentStatus>DEPLOYED</contentStatus>
</content>
<content>
<contentSID>110</contentSID>
<contentId>RAF_Intro</contentId>
<contentStatus>DEPLOYED</contentStatus>
</content>
<content>
<contentSID>109</contentSID>
<contentId>RAF_Email</contentId>
<contentStatus>DEPLOYED</contentStatus>
</content>
<content>
<contentSID>112</contentSID>
<contentId>RAF_Disclosures</contentId>
<contentStatus>DEPLOYED</contentStatus>
</content>
</contentList>
</lookupPageContentHeadersOutput>