clearAllCookies

Clear all browser cookies.

Syntax

cy.clearAllCookies()
cy.clearAllCookies(options)

Usage

Correct Usage

cy.clearAllCookies() // Clear all cookies

Arguments

options (Object)

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

OptionDefaultDescription
logtrueDisplays the command in the Command log
timeoutresponseTimeoutTime to wait for cy.clearAllCookies() to resolve before timing out

Yields

  • cy.clearAllCookies() yields null.

Rules

Requirements

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

Assertions

  • cy.clearAllCookies() cannot have any assertions chained.

Timeouts

  • cy.clearAllCookies() should never time out.

See also