Open forelock7 opened 1 year ago
Please provide more information on your use case. Cookies set in the API responses are set into the browser context automatically.
@pavelfeldman It's needed for login via API without filling login form. Case:
So is there any easy way to get cookies from response using Playwright? (I could do it from getting headerArray then parsing and so on... but it's not elegant way. Rest-Assured on java provides such)
I am also facing the same issue do we have any workaround for this ?
I have the same problem. I get a token from the Response Coockies field and I need to take it from there in order to log in without ui. Is there any way to get them?
The same problem. How i can extract cookie value from the server response?
Hello everybody , Any luck here ? I got same problem
Anyone found a solution to this?
This works for me , substring from response const setCookie = Login.headers()["set-cookie"] const sessionCookie = setCookie.substring(8, 56)
Use case:
Cannot find how to get cookies from api response (APIResponse)?
Before I did it via Java:
public Cookies getUserCookies(String host, String userName, String password) { return response(host, userName, password) **.getDetailedCookies()**; }
(io.restassured.response.ResponseOptions#getDetailedCookies)