Cypress Docs Logo
Guides API Plugins Examples FAQ Learn Learn GitHub
Guides API Plugins Examples FAQ Learn GitHub

API

  • Table of Contents

Events

  • Catalog of Events

Commands

  • Assertions

    • Assertions Reference
    • and
    • should
    Assertions
  • Queries

    • Retryability Guide
    • as
    • children
    • closest
    • contains
    • debug
    • document
    • eq
    • filter
    • find
    • first
    • focused
    • get
    • hash
    • invoke
    • its
    • last
    • location
    • next
    • nextAll
    • nextUntil
    • not
    • parent
    • parents
    • parentsUntil
    • prev
    • prevAll
    • prevUntil
    • root
    • shadow
    • siblings
    • title
    • url
    • window
    Queries
  • Actions

    • Actionability Guide
    • clear
    • click
    • check
    • dblclick
    • rightclick
    • select
    • selectFile
    • trigger
    • type
    • uncheck
    Actions
  • blur
  • clearCookie
  • clearCookies
  • clearLocalStorage
  • clock
  • each
  • end
  • exec
  • fixture
  • focus
  • getCookie
  • getCookies
  • go
  • hover
  • intercept
  • log
  • mount
  • origin
  • pause
  • readFile
  • reload
  • request
  • screenshot
  • scrollIntoView
  • scrollTo
  • session
  • setCookie
  • spread
  • spy
  • stub
  • submit
  • task
  • then
  • tick
  • viewport
  • visit
  • wait
  • wrap
  • within
  • writeFile

Utilities

  • _
  • $
  • Blob
  • Buffer
  • minimatch
  • Promise
  • sinon

Cypress API

  • Custom Commands
  • Custom Queries
  • Cookies
  • Keyboard
  • Screenshot
  • SelectorPlayground
  • arch
  • browser
  • config
  • currentTest
  • dom
  • env
  • isBrowser
  • isCy
  • log
  • platform
  • session
  • spec
  • testingType
  • version

Plugins

  • Writing a Plugin
  • Configuration
  • Preprocessors
  • Before Run
  • After Run
  • Before Spec
  • After Spec
  • Browser Launching
  • After Screenshot
  • Table of Contents
  • Catalog of Events
    • Assertions Reference
    • and
    • should
    • Retryability Guide
    • as
    • children
    • closest
    • contains
    • debug
    • document
    • eq
    • filter
    • find
    • first
    • focused
    • get
    • hash
    • invoke
    • its
    • last
    • location
    • next
    • nextAll
    • nextUntil
    • not
    • parent
    • parents
    • parentsUntil
    • prev
    • prevAll
    • prevUntil
    • root
    • shadow
    • siblings
    • title
    • url
    • window
    • Actionability Guide
    • clear
    • click
    • check
    • dblclick
    • rightclick
    • select
    • selectFile
    • trigger
    • type
    • uncheck
  • blur
  • clearCookie
  • clearCookies
  • clearLocalStorage
  • clock
  • each
  • end
  • exec
  • fixture
  • focus
  • getCookie
  • getCookies
  • go
  • hover
  • intercept
  • log
  • mount
  • origin
  • pause
  • readFile
  • reload
  • request
  • screenshot
  • scrollIntoView
  • scrollTo
  • session
  • setCookie
  • spread
  • spy
  • stub
  • submit
  • task
  • then
  • tick
  • viewport
  • visit
  • wait
  • wrap
  • within
  • writeFile
  • _
  • $
  • Blob
  • Buffer
  • minimatch
  • Promise
  • sinon
  • Custom Commands
  • Custom Queries
  • Cookies
  • Keyboard
  • Screenshot
  • SelectorPlayground
  • arch
  • browser
  • config
  • currentTest
  • dom
  • env
  • isBrowser
  • isCy
  • log
  • platform
  • session
  • spec
  • testingType
  • version
  • Writing a Plugin
  • Configuration
  • Preprocessors
  • Before Run
  • After Run
  • Before Spec
  • After Spec
  • Browser Launching
  • After Screenshot

Cypress.session

Cypress.session is a collection of session-related helper methods intended to be used alongside the cy.session() command.

Syntax

Clear all saved sessions and re-run the current spec file.

Cypress.session.clearAllSavedSessions()

This can also be done by clicking the "Clear All Sessions" button in the Sessions Instrument Panel.

Sessions Instrument Panel

See also

  • cy.session()
About
Discord
Discussions
Changelog
Roadmap
Jobs
GitHub YouTube Twitter

© 2022 Cypress.io. All rights reserved.

ON THIS PAGE

  • Syntax
  • See also
Back to Top