Value is returned | AssertionError: expected undefined to deeply equal

I am trying to validate the “Value” of a cookie and running into the below error, I am wondering if someone can point me in the right direction?

Thanks…

Error:
Value is returned | AssertionError: expected undefined to deeply equal ‘ekd41gmo3vnn11yiskpotstk’

Code:
pm.test(“Value is returned”, function () {
pm.expect(pm.cookies.get(‘ASP.NET_SessionId’).Value).to.eql(‘ekd41gmo3vnn11yiskpotstk’)
pm.expect(pm.response.responseTime).to.be.below(70);
});

That error makes me think you don’t have a cookie with that name. How are you managing cookies?

Here is the documentation:

1 Like

pm.test(“Value is returned”, function () {
pm.expect(pm.cookies.get(‘ASP.NET_SessionId’)).to.eql(‘negcpyymwuezumxl40c3bfgu’);
pm.expect(pm.response.responseTime).to.be.below(70);

});

Managed to fix the issue :slight_smile:

1 Like