I have run SOAP API request and get the response as below using robot framework.
(reply){
return = "PGP-98-Sq0awmdslfjsdssdlsifTvZUORTLe1fgVeUwaolR14QS"
}
I would like to retrieve the value PGP-98-Sq0awmdslfjsdssdlsifTvZUORTLe1fgVeUwaolR14QS from the response XML. I have tried to get the value using the command
${token}= Set Variable ${API_response_Data.return}
But it throws an error
SyntaxError: unexpected EOF while parsing (<string>, line 1)
The actual response from the SOAP UI tools looks like below (This is just for reference).
<soapenv:Envelope xmlns:soapenv="something" xmlns:xsd="something">
<soapenv:Body>
<ns1:response xmlns:ns1="http://something.com">
<return>PGP-98-Sq0awmdslfjsdssdlsifTvZUORTLe1fgVeUwaolR14QS</return>
</ns1:response>
</soapenv:Body>
</soapenv:Envelope>
I have used Parse XML keyword and I get the below error.
and when I use
${Token}= Get Element ${API_response_Data} .//*return
Log ${Token.text}
Please let me know how to extract the value from the return tag?