I need to add cy.wait() for some network call which has parameters having forward slashes in it.
eg: http://example.com/myPage1?id=598dccc6&startDate=10/01/2023&endDate=11/01/2023
For this, I've added the following intercept,
cy.intercept('http://example.com/myPage1**').as('myPage1');
However, cy.wait('@myPage1').its('response.statusCode').should('eq',200);
is getting timed out and the test case fails.
What should I do?
Thanks.
Reply to @agoff
Somehow this doesn't work. My baseUrl
is like http://192.168.43.82/font-end/#/
and api calls are made to http://192.168.43.82/rest/api/myPage
with query parameters.
I've tried
cy.intercept(
{
pathname:'/rest/api/myPage',
method:'POST'
}).as('myPage');
what's wrong with this?