{
  "doc": {
    "id": "api/commands/getalllocalstorage",
    "title": "getAllLocalStorage | Cypress Documentation",
    "description": "Get localStorage data for all origins with which the test has interacted in Cypress.",
    "section": "api",
    "source_path": "/llm/markdown/api/commands/getalllocalstorage.md",
    "version": "a8fd16711bdda4c7b5645b9717e588ae99ec2470",
    "updated_at": "2026-05-18T17:21:32.047Z",
    "headings": [
      {
        "id": "api/commands/getalllocalstorage#getalllocalstorage",
        "text": "getAllLocalStorage",
        "level": 1
      },
      {
        "id": "api/commands/getalllocalstorage#syntax",
        "text": "Syntax",
        "level": 2
      },
      {
        "id": "api/commands/getalllocalstorage#usage",
        "text": "Usage",
        "level": 3
      },
      {
        "id": "api/commands/getalllocalstorage#arguments",
        "text": "Arguments",
        "level": 3
      },
      {
        "id": "api/commands/getalllocalstorage#yields-learn-about-subject-management",
        "text": "Yields Learn about subject management",
        "level": 3
      },
      {
        "id": "api/commands/getalllocalstorage#examples",
        "text": "Examples",
        "level": 2
      },
      {
        "id": "api/commands/getalllocalstorage#get-all-localstorage",
        "text": "Get all localStorage",
        "level": 3
      },
      {
        "id": "api/commands/getalllocalstorage#rules",
        "text": "Rules",
        "level": 2
      },
      {
        "id": "api/commands/getalllocalstorage#requirements-learn-about-chaining-commands",
        "text": "Requirements Learn about chaining commands",
        "level": 3
      },
      {
        "id": "api/commands/getalllocalstorage#assertions-learn-about-assertions",
        "text": "Assertions Learn about assertions",
        "level": 3
      },
      {
        "id": "api/commands/getalllocalstorage#timeouts-learn-about-timeouts",
        "text": "Timeouts Learn about timeouts",
        "level": 3
      },
      {
        "id": "api/commands/getalllocalstorage#see-also",
        "text": "See also",
        "level": 2
      }
    ]
  },
  "chunks": [
    {
      "id": "api/commands/getalllocalstorage#syntax",
      "doc_id": "api/commands/getalllocalstorage",
      "heading": "Syntax",
      "heading_level": 2,
      "content_markdown": "## Syntax\n\n```\ncy.getAllLocalStorage()cy.getAllLocalStorage(options)\n```\n\n### Usage\n\n**Correct Usage**\n\n```\ncy.getAllLocalStorage()\n```\n\n### Arguments\n\n**options _(Object)_**\n\nPass in an options object to change the default behavior of `cy.getAllLocalStorage()`.\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `log` | `true` | Displays the command in the [Command log](/llm/markdown/app/core-concepts/open-mode.md#Command-Log) |\n\n### Yields [Learn about subject management](/llm/markdown/app/core-concepts/introduction-to-cypress.md#Subject-Management)\n\n`cy.getAllLocalStorage()` yields an object where the keys are origins and the values are key-value pairs of `localStorage` data.\n\nFor example, if `key1` is set to `value1` on `https://example.cypress.io` and `key2` is set to `value2` on `https://www.cypress-dx.com`, `cy.getAllLocalStorage()` will yield:\n\n```\n{  'https://example.cypress.io': {    key1: 'value1',  },  'https://www.cypress-dx.com': {    key2: 'value2',  },}\n```\n",
      "section": "api",
      "anchors": [
        "syntax"
      ],
      "path": "/llm/json/chunked/api/commands/getalllocalstorage.json",
      "token_estimate": 151
    },
    {
      "id": "api/commands/getalllocalstorage#arguments",
      "doc_id": "api/commands/getalllocalstorage",
      "heading": "Arguments",
      "heading_level": 3,
      "content_markdown": "### Arguments\n\n**options _(Object)_**\n\nPass in an options object to change the default behavior of `cy.getAllLocalStorage()`.\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `log` | `true` | Displays the command in the [Command log](/llm/markdown/app/core-concepts/open-mode.md#Command-Log) |\n",
      "section": "api",
      "anchors": [
        "arguments"
      ],
      "path": "/llm/json/chunked/api/commands/getalllocalstorage.json",
      "token_estimate": 57
    },
    {
      "id": "api/commands/getalllocalstorage#yields-learn-about-subject-management",
      "doc_id": "api/commands/getalllocalstorage",
      "heading": "Yields Learn about subject management",
      "heading_level": 3,
      "content_markdown": "### Yields [Learn about subject management](/llm/markdown/app/core-concepts/introduction-to-cypress.md#Subject-Management)\n\n`cy.getAllLocalStorage()` yields an object where the keys are origins and the values are key-value pairs of `localStorage` data.\n\nFor example, if `key1` is set to `value1` on `https://example.cypress.io` and `key2` is set to `value2` on `https://www.cypress-dx.com`, `cy.getAllLocalStorage()` will yield:\n\n```\n{  'https://example.cypress.io': {    key1: 'value1',  },  'https://www.cypress-dx.com': {    key2: 'value2',  },}\n```\n",
      "section": "api",
      "anchors": [
        "yields-learn-about-subject-management"
      ],
      "path": "/llm/json/chunked/api/commands/getalllocalstorage.json",
      "token_estimate": 77
    },
    {
      "id": "api/commands/getalllocalstorage#rules",
      "doc_id": "api/commands/getalllocalstorage",
      "heading": "Rules",
      "heading_level": 2,
      "content_markdown": "## Rules\n\n### Requirements [Learn about chaining commands](/llm/markdown/app/core-concepts/introduction-to-cypress.md#Chains-of-Commands)\n\n*   `cy.getAllLocalStorage()` requires being chained off of `cy`.\n\n### Assertions [Learn about assertions](/llm/markdown/app/core-concepts/introduction-to-cypress.md#Assertions)\n\n*   `cy.getAllLocalStorage()` will only run assertions you have chained once, and will not [retry](/llm/markdown/app/core-concepts/retry-ability.md).\n\n### Timeouts [Learn about timeouts](/llm/markdown/app/core-concepts/introduction-to-cypress.md#Timeouts)\n\n*   `cy.getAllLocalStorage()` cannot time out.\n",
      "section": "api",
      "anchors": [
        "rules"
      ],
      "path": "/llm/json/chunked/api/commands/getalllocalstorage.json",
      "token_estimate": 60
    }
  ]
}