clearAllSessionStorage

Clear sessionStorage data 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.

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