Add wait (5 secs) after each page load / redirect #26042
Unanswered
joseleperez
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
After loading each page within my tests, I need to set a .wait(5secs) before any other action is taken.
I know how to do it with the first-page visit (by overloading the .visit command), but that doesn't apply to page loads after clicking a link or normal navigation automatically triggered.
I tried putting it on the window:load event listener, but adding a cy.wait, there triggers a promise inside the promise problem.
The use case that I have hundreds of tests already implemented on our site, but now we have some async JS that might modify the site, and the shortest path for not modifying all tests is just waiting for that JS to be triggered.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions