I'm trying to store the value of a uuid "EnquiryId" from an XML response. I believe the standard approach is to use xpath but I'm not using it correctly and receiving "java.util.NoSuchElementException: key not found: enquiryId"
Response Example:
<created_enquiry xmlns="http://www.test.com/energy-rest-enquiry.xsd">
<enquiry_id id="1705230d-a64d-f075-e477-b11c3dabfa9c" link="value"/>
</created_enquiry>
Code example:
http("REST Users Post Submit Enquiry")
.post("/rest/enquiry/enquiry")
.headers(headersREST)
.body(ELFileBody("RestSubmitEnquiry.xml"))
.check(status.is(201))
.check(xpath("/*/enquiry_id/@id").saveAs("enquiryId"))
Thanks