Not able get the Node value and seeing [Ljava.lang.String;@36013a3b error in Grooy script response
Hi I am trying to implement Groovy Srcipt for below request to retrive the Node value of the 3rd element in SOAP request using getNodeValue or getNodeValues method by accessing the xpath of the element but I am seeing below message in log. Please help me how to retrieve the actual value of DepartureDateTime element in the below request.
Groovry Script Response: Fri Apr 03 16:14:15 CDT 2020:INFO:[Ljava.lang.String;@36013a3b.
I have added Custom Properties TrvlDateTime,TrvlDateArv and Tktdate at Test Suite Level and would like
My Sample SOAP XML Request :
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://www.del.com/merch/services">
<soapenv:Header/>
<soapenv:Body>
<MerchOfferRequest TransactionIdentifier="55678" TransactionLog="true">
<RequestCriterion>
<OriginDestinationOptions Id="OD1">
<FlightSegment ActiveInd="Y" Id="1">
<DepartureAirport LocationCode="IAH"/>
<ArrivalAirport LocationCode="DEN"/>
<DepartureDateTime>2020-12-01T19:00:00</DepartureDateTime>
<ArrivalDateTime>2020-12-01T19:00:00</ArrivalDateTime>
<FlightNumber>863</FlightNumber>
</MerchOfferRequest>
</soapenv:Body>
</soapenv:Envelope>
My Groovy Script Code:
def tdep = testRunner.testCase.testSuite.getPropertyValue("TrvlDateTime")
def tarv = testRunner.testCase.testSuite.getPropertyValue("TrvlDateArv")
def ttkt = testRunner.testCase.testSuite.getPropertyValue("Tktdate")
def saloffer = testRunner.testCase.testSteps["SAL_offer"].getPropertyValue("Request")
def salreqnode = new XmlHolder(saloffer);
def path = salreqnode.getNodeValues('//soapenv:Envelope/soapenv:Body/MerchOfferRequest/RequestCriterion/OriginDestinationOptions/FlightSegment/DepartureDateTime')
log.info path