Cypress on headless mode not able to resolve JS promises through await calls #31240
Unanswered
mikemd121
asked this question in
Questions and Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Here I 1st request is working properly but 2nd request is failed in cypress headless mode. But surprisingly both requests are working properly in headed UI mode. I am trying so many things to fix this. but still couldnt find any solution
function makeRequest(requestOptions) {
return new Promise((resolve, reject) => {
try {
cy.request(requestOptions.url, requestOptions).then(resolve)
} catch (error) {
reject(error)
}
})
}
await makeRequest()
await makeRequest()
Beta Was this translation helpful? Give feedback.
All reactions