Fetch cookies from soapUI Request and Response and reuse for following Requests
Hi
I have used follow script trying to get the cookies.
def myClient = HttpClientSupport.getHttpClient()
def myStore = myClient.getCookieStore()
def cookieList = myStore.getCookies()
log.info cookieList.size()
It returned the zero of the size.
But using this:
def setCookie_resp = testRunner.testCase.testSteps["HTTP Request 1"].testRequest.response.getResponseHeaders()
log.info setCookie_resp.size()
log.info setCookie_resp["#status#"]
It can get the size is same as the Headers on soapUI showing.
But that size and real Cookie content is not same as the results got by browser developement tool.
"HTTP Request 1" is the first request to login on the test box.
Other question I would ask for the help.
After successfully the first Request, which is Post for login, I expect to do the second Request to Get some json data, but it is never successful.
Thanks very much if any expert can help!
Cheers