Forum Discussion

user8181's avatar
13 years ago

How can I get multiple attributes from a response

I need to get multiple attributes from a response and use them later for a different test step request. I am able to get that for single attribute like session ID using he xpath. Not sure how to retrieve multiple attributes.

My response looks like and I need to just get the values "runtime.Runtime1" and "runtime.Runtime2" values-

<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Body>
<ns:getRuntimeParamNamesResponse xmlns:ns="http://abc.com" xmlns:ax244="http://def.com">
<ns:return>runtime.RunTime1</ns:return>
<ns:return>runtime.RunTime2</ns:return>
</ns:getRuntimeParamNamesResponse>
</soapenv:Body>
</soapenv:Envelope>
  • paceroza's avatar
    paceroza
    New Contributor
    if you use know (constant) number of values you can use Transfer Parameters step. That is the easiest way.
    if you have a number of parameters or unknown number of values you want to use in other steps, you can use Groovy Script (at least I would use it)

    Cheers