Forum Discussion
smartTest
12 years agoContributor
Well I surprised myself and make my Groovy step work
The code used for anyone else looking to do the same was:
Very proud of myself and thankful for Google and this forum
The code used for anyone else looking to do the same was:
def grUtils = new com.eviware.soapui.support.GroovyUtils(context)
def ReqHolder = grUtils.getXmlHolder("completeBooking#Request")
ReqHolder.removeDomNodes('//cfb:completeBooking_RQ[1]/ota:PriceInfo[1]/ota:PTC_FareBreakdowns[1]/ota:PTC_FareBreakdown[1]/ota:PassengerFare[1]/ota:TotalFare[1]') //removes Fare Node
ReqHolder.removeDomNodes('//cfb:completeBooking_RQ[1]/ota:PriceInfo[1]/ota:PTC_FareBreakdowns[1]/ota:PTC_FareBreakdown[1]/ota:PassengerFare[1]/ota:FareBaggageAllowance[1]') //removes first FareBaggageAllowance node
ReqHolder.removeDomNodes('//cfb:completeBooking_RQ[1]/ota:PriceInfo[1]/ota:PTC_FareBreakdowns[1]/ota:PTC_FareBreakdown[1]/ota:PassengerFare[1]/ota:FareBaggageAllowance[1]') //removes second FareBaggageAllowance node
ReqHolder.removeDomNodes('//cfb:completeBooking_RQ[1]/ota:PriceInfo[1]/ota:PTC_FareBreakdowns[1]/ota:PTC_FareBreakdown[2]/ota:PassengerFare[1]/ota:TotalFare[1]') //removes Fare Node
ReqHolder.removeDomNodes('//cfb:completeBooking_RQ[1]/ota:PriceInfo[1]/ota:PTC_FareBreakdowns[1]/ota:PTC_FareBreakdown[2]/ota:PassengerFare[1]/ota:FareBaggageAllowance[1]') //removes first FareBaggageAllowance node
ReqHolder.removeDomNodes('//cfb:completeBooking_RQ[1]/ota:PriceInfo[1]/ota:PTC_FareBreakdowns[1]/ota:PTC_FareBreakdown[2]/ota:PassengerFare[1]/ota:FareBaggageAllowance[1]') //removes second FareBaggageAllowance node
ReqHolder.updateProperty()
Very proud of myself and thankful for Google and this forum
Related Content
- 3 years agoMis3