Files
cypress/docs/source/api/commands/reload.md
T

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:

screen shot 2016-01-27 at 2 49 44 pm

When clicking on cy.reload within the command log, the console outputs the following:

screen shot 2016-01-27 at 2 50 01 pm

Related