faisalmalik
7 years agoNew Contributor
Pass cookie value in READY API from response to another test step
Hi,
I have a test case which generates a cookie in the response headers in one of the test steps. The cookie needs to be persisted in the rest of the tests. I have tried using the option Maintain Http Session and that doesn't work.
Can you please let me know how to pass that cookie which is only in the headers and the raw response.
Is there a Groovy script that needs to be written for this or it can be passed using the headers itself.
As of now, I am passing a hardcoded value for the cookie which works for the flow we have.
However, that makes the tests brittle. If someone could help with the groovy script that would be helpful.
Also, I have no knowledge of groovy.
Thanks
Faisal