{
  "doc": {
    "id": "api/commands/end",
    "title": "end | Cypress Documentation",
    "description": "Deprecated: End a chain of commands in Cypress.",
    "section": "api",
    "source_path": "/llm/markdown/api/commands/end.md",
    "version": "a8fd16711bdda4c7b5645b9717e588ae99ec2470",
    "updated_at": "2026-05-18T17:21:32.047Z",
    "headings": [
      {
        "id": "api/commands/end#end-cypress-documentation",
        "text": "end | Cypress Documentation",
        "level": 1
      },
      {
        "id": "api/commands/end#end",
        "text": "end",
        "level": 1
      },
      {
        "id": "api/commands/end#syntax",
        "text": "Syntax",
        "level": 2
      },
      {
        "id": "api/commands/end#usage",
        "text": "Usage",
        "level": 3
      },
      {
        "id": "api/commands/end#yields-learn-about-subject-management",
        "text": "Yields Learn about subject management",
        "level": 3
      },
      {
        "id": "api/commands/end#examples",
        "text": "Examples",
        "level": 2
      },
      {
        "id": "api/commands/end#rules",
        "text": "Rules",
        "level": 2
      },
      {
        "id": "api/commands/end#requirements-learn-about-chaining-commands",
        "text": "Requirements Learn about chaining commands",
        "level": 3
      },
      {
        "id": "api/commands/end#assertions-learn-about-assertions",
        "text": "Assertions Learn about assertions",
        "level": 3
      },
      {
        "id": "api/commands/end#timeouts-learn-about-timeouts",
        "text": "Timeouts Learn about timeouts",
        "level": 3
      },
      {
        "id": "api/commands/end#command-log",
        "text": "Command Log",
        "level": 2
      },
      {
        "id": "api/commands/end#see-also",
        "text": "See also",
        "level": 2
      }
    ]
  },
  "chunks": [
    {
      "id": "api/commands/end#syntax",
      "doc_id": "api/commands/end",
      "heading": "Syntax",
      "heading_level": 2,
      "content_markdown": "## Syntax\n\n```\n.end()\n```\n\n### Usage\n\n**Correct Usage**\n\n```\ncy.get('ul').end() // Yield 'null' instead of 'ul' element\n```\n\n**Incorrect Usage**\n\n```\ncy.end()\n```\n\n### Yields [Learn about subject management](/llm/markdown/app/core-concepts/introduction-to-cypress.md#Subject-Management)\n\n*   `.end()` yields `null`.\n",
      "section": "api",
      "anchors": [
        "syntax"
      ],
      "path": "/llm/json/chunked/api/commands/end.json",
      "token_estimate": 45
    },
    {
      "id": "api/commands/end#examples",
      "doc_id": "api/commands/end",
      "heading": "Examples",
      "heading_level": 2,
      "content_markdown": "## Examples\n\n`.end()` is useful when you want to end a chain of commands and force the next command to not receive what was yielded in the previous command.\n\n```\ncy.get('#user-cheryl')  .click()  .end() // yield null  .get('#user-charles')  .click() // get looks for the element in the document now\n```\n\nAlternatively, you can always start a new chain of commands off of `cy`.\n\n```\ncy.get('#user-cheryl').click()cy.get('#user-charles').click() // get looks for the element in the document now\n```\n",
      "section": "api",
      "anchors": [
        "examples"
      ],
      "path": "/llm/json/chunked/api/commands/end.json",
      "token_estimate": 100
    },
    {
      "id": "api/commands/end#rules",
      "doc_id": "api/commands/end",
      "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*   `.end()` requires being chained off a previous command.\n\n### Assertions [Learn about assertions](/llm/markdown/app/core-concepts/introduction-to-cypress.md#Assertions)\n\n*   `.end()` cannot have any assertions chained.\n\n### Timeouts [Learn about timeouts](/llm/markdown/app/core-concepts/introduction-to-cypress.md#Timeouts)\n\n*   `.end()` cannot time out.\n",
      "section": "api",
      "anchors": [
        "rules"
      ],
      "path": "/llm/json/chunked/api/commands/end.json",
      "token_estimate": 52
    }
  ]
}