Forum Discussion

wlied's avatar
wlied
New Contributor
13 years ago

[Resolved] Datasource with XML iterating array

We have a test case where we use a datasource to iterate through multiple query strings for a rest service. The service will return with multiple results. Looking for a way to scrape each result from the response to export it into an excel file for comparison and validation.

We currently have the following defined, datasource, method (responseasxml), property transfer, datasink and datasource loop.

With the response it doesn't appear a clear way to use XPATH to get all of the elements in the array into the property transfer.
  • Hi,

    you could set up an XML datasource that loops the response items and a property-transfer that transfers them to the the DataSink - ie

    1. existing datasource
    2. existing method
    3. new xml datasource that loops the items in the <method> response
    4. new property-transfer from xml-datasource to datasink
    5. existing datasink
    6. new datasource loop - back to 4 for each row in 3
    7. existing datasource - back to 2 for each row in 1

    Does that make sense?

    regards,

    /Ole
    SmartBear Software