为什么 cy.request 在 Chrome DevTools 网络选项卡中看不到

Why cy.request can not be seen in Chrome DevTools Network tab

我正在调用多个 cy.request。

为什么我在 Chrome DevTool 网络选项卡中看不到它们?

cy.request() 来自测试运行程序,而不是应用程序。它绕过浏览器网络选项卡。

请参阅“cy.request”的文档 Debugging

Debugging

Request is not displayed in the Network Tab of Developer Tools

Cypress does not actually make an XHR request from the browser. We are actually making the HTTP request from the Cypress Test Runner (in Node). So, you won't see the request inside of your Developer Tools.