How to wait for page finish reloading after click?
See original GitHub issueI got form and when I trigger click on submit button this cause to refresh current page. After that I would like to do some assertions. How I know that page finished refreshing and I can start to searching an element to do assertions?
Looking for something like page.waitForNavigation
in Puppeteer.
cy.get('#formButton').click() // adds new item and refresh page
// do assertions on page
Issue Analytics
- State:
- Created 5 years ago
- Reactions:44
- Comments:47 (12 by maintainers)
Top Results From Across the Web
How wait for page finish reloading in cypress after click?
1) Make SPA without refresh and use callback/promise after change DOM; · 2) Set cookie, refresh page, each time when page loaded use...
Read more >Detect page reload from Cypress test - Gleb Bahmutov
The test finishes suspiciously quickly - in just 1 second, while the asynchronous code executes in 2 seconds. So we know something is...
Read more >reload - Cypress Documentation
reload () yields the window object after the page finishes loading. It is unsafe to chain further commands that rely on the yielded...
Read more >How to get Selenium to wait for a page to load - BrowserStack
Wondering how to wait for a web page to load in Selenium testing? Read tutorial to understand 3 methods to execute the same....
Read more >How to Get Selenium to Wait for Page Load After a Click
Really, I just want a reliable way of waiting until the page has finished loading after I click on a thing. I totally...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
A workaround I found was
Cypress automatically detects and waits for the page to finish loading. You don’t need to be concerned with it. It will pause command execution, prevent them from timing out, and then begin re-running them once the page transition is complete.