-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to cy.visit() to complete on DOMContentLoaded instead of onLoad #440
Comments
+1 |
1 similar comment
+1 |
This would be incredibly helpful for my tests as well - DOMContentLoaded will succeed, but window:load will not. I really would need to pass a param that would use DOMContentLoaded instead of window:load, perhaps in a window:before:load event listener |
+1 |
+1 This issue seems to be open for long, how have others handled similar situation on their end? |
@pm-komal-jain I've recently found a solution, at least for my automation project in my web app. |
@AustinBernerEvercast - Thanks for your response. |
@pm-komal-jain That sucks 😞 |
+1 |
1 similar comment
+1 |
This would be a great feature. It's currently implemented in Playwright, and has been useful recently as we've had an issue with a third-party script that's making a request that never resolves, and holds up the If anyone knows another way I can get Cypress tests to work in this situation, I'd love to be enlightened! |
+1 |
1 similar comment
+1 |
my current workaround is to check on the Network tab what is the last request sent by the application after loading the URL, for example So in cypress I would have a So far with that, and maybe having a |
How hard can it be to add this essential feature? It's been requested since 2017. What is everyone testing with cypress while not having this exact problem? Is it that rare to have a long-loading resource on a page that is not critical for DOM rendering? |
Since using the approach I described above, I've never encountered this issue anymore @gvlasov |
@a8trejo I've also come up with that solution. Doing that for a script-heavy website like an e-commerce store is a huge pain in the ass, and I don't think that can be considered a viable workaround. |
are we waiting for a 10y anniversary for this feature request? |
I'm testing a site that has a lot of scripts loaded on it and even though the elements I want to test for are present quickly, the test has to wait for everything on the page to load.
The text was updated successfully, but these errors were encountered: