Forum Discussion
satishdurugu
New Contributor
Hi Rao,
I want to capture entire request into one variable , then access DepartureDateTime in the request with xpath and then replace it with new custom property value. Before doing that I would like to retrieve the value of the element using getNodeValue. But I am getting null value when I am trying to retrieve value of Departure Date Time element.
def saloffer = testRunner.testCase.testSteps["SAL_offer"].getPropertyValue("Request")
def salreqnode = new XmlHolder(saloffer);
def path = salreqnode.getNodeValue("//soapenv:Envelope/soapenv:Body//MerchOfferRequest/RequestCriterion/*:OriginDestinationOptions/*:FlightSegment/*:DepartureDateTime")
log.info path
Console output:
- Sun Apr 19 01:57:29 CDT 2020:INFO:null
nmrao
5 years agoChampion Level 3
Can you please answer my previous question?
Related Content
- 5 years agoRahul12
Recent Discussions
- 14 hours agoruchisingh