mirror of
https://github.com/cypress-io/cypress.git
synced 2026-05-18 22:28:38 -05:00
1.7 KiB
1.7 KiB
title, comments, description
| title | comments | description |
|---|---|---|
| reload | true |
Reload the page.
| Returns | the window object of the newly reloaded page |
| Timeout | cy.reload will retry for the duration of the pageLoadTimeout or the duration of the timeout specified in the command's options. |
cy.reload()
Reload the page from the current URL.
cy.reload( forceReload )
Reload the current page, without using the cache if forceReload is true
Options
Pass in an options object to change the default behavior of cy.reload.
cy.reload( options )
| Option | Default | Notes |
|---|---|---|
timeout |
pageLoadTimeout | Total time to retry the visit |
log |
true |
whether to display command in command log |
Usage
Reload the page as if the user clicked the Refresh button
cy
.visit("http://localhost:3000/admin")
.reload()
Force Reload Usage
Reload the page without using the cache
cy
.visit("http://localhost:3000/admin")
.reload(true)
Command Log
Reload the page
cy.reload()
The commands above will display in the command log as:
When clicking on cy.reload within the command log, the console outputs the following:

