Forum Discussion
ReshmaSachdev
13 years agoContributor
Hello,
You can use following groovy script in between your both test steps
def response = context.expand( '${Request1#Response#declare namespace ns=\'whichever you have'; //ns:Response[1]/ns:status[1]}' )
teststep = testRunner.testCase.getTestStepByName("Request2")
if(response == 'P' || response == 'p')
teststep.setPropertyValue('status', 'Pending')
else if(response == 'A' || response == 'a')
teststep.setPropertyValue('status', ‘Active’)
Hope it helps.
You can use following groovy script in between your both test steps
def response = context.expand( '${Request1#Response#declare namespace ns=\'whichever you have'; //ns:Response[1]/ns:status[1]}' )
teststep = testRunner.testCase.getTestStepByName("Request2")
if(response == 'P' || response == 'p')
teststep.setPropertyValue('status', 'Pending')
else if(response == 'A' || response == 'a')
teststep.setPropertyValue('status', ‘Active’)
Hope it helps.