skip to content
Alvin Lucillo

Intercept response in cy.wait

/ 1 min read

💻 Tech

To intercept response from a server call in cy.wait, you can create an argument in the callback function:

cy.wait('@someRoute').then((xhr) => {
  console.log(xhr.response.body);
});