Function When_I_clear_local_storage

  • When I clear local storage:

    When I clear local storage
    When I clear local storage {string}

    Clear localStorage data for current domain and subdomain.

    Parameters

    • Optionalkey: string

    Returns void

    Clear all localStorage:

    When I clear local storage
    

    Clear localStorage with the key appName:

    When I clear local storage "appName"
    

    Cypress automatically clears all local storage before each test to prevent state from being shared across tests when test isolation is enabled. You shouldn't need to use this command unless you're using it to clear localStorage inside a single test or test isolation is disabled.