samedi 17 avril 2021

How to configure Cookies with Cypress?

I'm trying to configure Cypress to have a Cookie in each request header. How do I achieve this? I'm trying this way:

it('successfully loads', () => {
    cy.visit('http://localhost:4200', { headers: { Cookie: 'JSESSIONID=064063D96094773DACBD93A2FD31736F' } });
});

Aucun commentaire:

Enregistrer un commentaire