SoapUI with Groovy I am using SoapUI pro and groovy script. I am reading the customers record from request into the following,
def CustRec = context.expand('${GetProductPriceOffer#Request#/tem:request[1]/quot:Customers[1]}' )
the value in CustRec is,
<quot:Customers>
<quot:Person>
<quot:CustomerType>PRIMARY</quot:CustomerType>
<quot:Sequence>0</quot:Sequence>
</quot:Person>
<quot:Person>
<quot:CustomerType>ADULT</quot:CustomerType>
<quot:Sequence>1</quot:Sequence>
</quot:Person>
</quot:Customers>
Now I want to count the total number of Person objects in Customers (i.e. answer is 2 in this scenario). I tried with while loop but it did not work for me. Can anyone tell how can I achieve using the loops?
Thanks in advance