Search code examples
restkatalon-studio

How to pass variable value to json Path in Katalon Studio Rest API


//fetching Policy ID from Response def slurper = new groovy.json.JsonSlurper()

def result = slurper.parseText(response.getResponseBodyContent())
def result_value = result.PolicyID
GlobalVariable.Policyid = result_value

//now want to use Policy ID on Verificaton

WS.verifyElementPropertyValue(res, 'Hist[0].Gltran.**S-HO1-20-PPHO-3820501**JV-SON-PRE-PPHO-2010-11.Cr', 20)

So Please help me how to pass variable value in json path on verification Level


Solution

  • Try with

    WS.verifyElementPropertyValue(res, GlobalVariable.Policyid, 20)