Forum Discussion
nmrao
6 years agoChampion Level 3
That is very much possible.
Here is the approach:
Have a script assertion for the step where you get the cookie and extract the cookie and store it at project level or so.
Then use the Events feature, to add the cookie for each outgoing requests.
Here is the approach:
Have a script assertion for the step where you get the cookie and extract the cookie and store it at project level or so.
Then use the Events feature, to add the cookie for each outgoing requests.
- richie6 years agoCommunity Hero
nmrao knows way more than I do about this stuff so I'd listen to him.
Bill_In_Irvine gave me the following to extract a header value and pass it to a Properties step (so cred goes to Bill for this - not me)
//Takes one of the elements of the response Header def value = testRunner.testCase.testSteps["REST request step name"].testRequest.response.responseHeaders["headername"] //Read this value into a parameter def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context ) groovyUtils.setPropertyValue("Properties", "headername",value[0])
Cheers,
richie
- faisalmalik6 years agoNew Contributor
Thanks Guys,
Sorry for the delayed response, as I have been on a parental Leave :) I have tried richie 's method and worked like a charm.
didn't get the time to try out nmrao method.
Cheers
Faisal
- nmrao6 years agoChampion Level 3There can be multiple ways of doing the same thing.
Glad to know that you had it working.