clearAllSessionStorage

Clear data in sessionStorage for all origins with which the test has interacted.

Syntax

cy.clearAllSessionStorage()
cy.clearAllSessionStorage(options)

Usage

Correct Usage

cy.clearAllSessionStorage()

Arguments

options (Object)

Pass in an options object to change the default behavior of cy.clearAllSessionStorage().

OptionDefaultDescription
logtrueDisplays the command in the Command log

Yields

  • cy.clearAllSessionStorage() yields null.
  • cy.clearAllSessionStorage() cannot be chained further.

Examples

Clear all sessionStorage

cy.clearAllSessionStorage()

Rules

Requirements

  • cy.clearAllSessionStorage() requires being chained off of cy.

Assertions

cy.clearAllSessionStorage() cannot have any assertions chained.

Timeouts

  • cy.clearAllSessionStorage() cannot time out.

See also