Forum Discussion
- nmrao
Champion Level 2
In case if that is just a string and need to extract the value?
def str = 'iaa.service.response/v2/policy/4512650' //Get the id def policyId = str.substring(str.lastIndexOf('/')+1, str.size()) //Save it at test case level custom property for later use context.testCase.setPropertyValue('POLICYID', policyId)
In the next step, use property expansion i.e., ${#TestCase#POLICYID} where every it is needed