Cypress: Cypress- Can I get api body response without stubbing the request?

Created on 6 Nov 2018  路  2Comments  路  Source: cypress-io/cypress

A GET request done in our system, I want to get the values from the json that returns in the response. Is there any way to do that in Cypress?

Version
Cypress 3.0.1

Most helpful comment

I can see the response, but responseBody is a Blob. My question is how get the responseBody as a JSON

All 2 comments

Yes. Using cy.route() and cy.wait() https://on.cypress.io/wait#Alias

In the future we recommend questions relating to how to use Cypress be asked in our community chat. Issues in our GitHub repo are reserved for potential bugs or feature requests. We want our team to spend all the time we have building a better product and hope you understand.

I can see the response, but responseBody is a Blob. My question is how get the responseBody as a JSON

Was this page helpful?
0 / 5 - 0 ratings