Forum Discussion

vengates's avatar
13 years ago

Problem in creating Assertion for particular node

Hi All,
please anyone help me to solve the following issue.
i want to create assertion for the following case
<ns1:getStatusesOutput>
<ns1:Statuses>
<ns1:code>BUS</ns1:code>
<ns1:use>Vehicle</ns1:use>
</ns1:Statuses>
<ns1:Statuses>
<ns1:code>Movie</ns1:code>
<ns1:use>Entertain</ns1:use>
</ns1:Statuses>
</ns1:getStatusesOutput>
In this xml I want to create assertion to check if my code tag is "BUS" then the use should be "Vehicle". I have created using xpath but the problem is each time when I executing the request the response will chnage .
for eg : the status of movie will come first and the status of BUS will come second . In this case I couldn't able to create the assertion.
<ns1:getStatusesOutput>
<ns1:Statuses>
<ns1:code>Movie</ns1:code>
<ns1:use>Entertain</ns1:use>
</ns1:Statuses>
<ns1:Statuses>
<ns1:code>BUS</ns1:code>
<ns1:use>Vehicle</ns1:use>
</ns1:Statuses>
</ns1:getStatusesOutput>
awating for anyone to reply.
No RepliesBe the first to reply