I\'m trying to extract a SessionId from the XML which is returned from a SOAP API.
I\'ve read through the Postman documentation (several times over) but it wasn\'t t
Postman v7.20.1
I'd like to add my answer since above there are a couple of details that took me a while to solve:
Here's the first lines of my XML response to analyze:
------=_Part_694527_1470506002.1584708814081
Content-Type: application/xop+xml;charset=UTF-8;type="text/xml"
Content-Transfer-Encoding: 8bit
Content-ID:
1
CHECKIN_UNIVERSAL
After I noticed it was a multipart I've ended up with this Postman Test:
var response = pm.response.text();
var responseBody = response.substr(response.indexOf(' {
if (field.name == 'StatusMessage'){
console.log("Field = " + field.name);
pm.expect(field.text().to.include("Successfully checked in"));
}
});
});