Forum Discussion

chandanakki's avatar
chandanakki
Occasional Contributor
12 years ago

Need your help in writing the Groovy Script

Hi All,

I am new to Groovy Script. Can you please help me in resolving the below query?

In Soap UI On response header I was able to Grab Set-Cookie and store value in a Property File

But it stores value as below
[authorization=loggedIn; path=/; domain=.google.com,
ObSSOCookie=hfhfhjjftxfkLQ1i6RpkuG2Pgrp2t5lmKfSpaY8vg4XEu;path=/; domain=.google.com, cdc_lt=loggedIn;domain=.google.com;path=/; path=/]

Using Groovy Script from Above output
1) I need to remove the opening & closing long brackets--->[ ]
2) I need to replace comma (,) at the first line ending into semicolon--->; (before ObSSOCookie=)
3) I need to Add semicolon-->; at end of the above o/p

Thanks,
Chandan