I have a usecase where i need to run multiple different logins , but when i run the collection 1st Request will get succeeded where the cookie is being stored, this cookie is getting passed for all the following requests , because if which the requests are failing.
i tried script for clearing cookie after the request gets completed.
but cookie is not getting deleted
can someone help me here to resolve the issue. (this is happening in newman aswell)
below is the script used to clear cookie
const jar = pm.cookies.jar();
jar.getAll(pm.request.url, function (error, cookies) {
// error -
// cookies -
// PostmanCookieList: https://www.postmanlabs.com/postman-collection/CookieList.html
});
jar.clear(pm.request.url, function (error) {
// error -
});