I have written a Postman test script which is returning an xml in repsonse. But the test script is not running.
TestScript:
var jsonObject = xml2Json(responseBody);
console.log(jsonObject);
tests["TestCase"] = jsonObject.CreatePOReq.CreatePOReq.ProjectNumber === "3466703";
Response xml:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<CreatePOReq ReturnStatus="Send to Vendor" GoetPONumber="806236" ProjectNumber="3466703">
<line/>
<header/>
</CreatePOReq>
Error : There was an error in evaluating the test script: TypeError: Cannot read property 'ProjectNumber' of undefined