Forum Discussion

coopernico46's avatar
coopernico46
Occasional Contributor
6 years ago
Solved

Can't extract a value from a label to a Property

Hi all   I'm newbie with SOAP and i'm having problems when i try to extract a value from a label to a Property.   I have this already done for other steps but in this case i don't know what i'm d...
  • coopernico46's avatar
    coopernico46
    6 years ago

    Hi All

     

    Finally i solve my problem.

     

    Here you have the code cause maybe someone could have the same question in a future.

    def CruisePackageCodetoChoose = new XmlSlurper().parseText(context.response)."**".find{ 
    	it.SelectedSailing.Region.find{
    				            it.'@RegionCode'.text() == "PISGR"
    			}
     }.InclusivePackageOption.@CruisePackageCode?.text()
    context.testCase.setPropertyValue('CruisePackageCode', CruisePackageCodetoChoose)

     

    Best regards