{
  "doc": {
    "id": "api/commands/find",
    "title": "find | Cypress Documentation",
    "description": "Get the descendent DOM elements of a specific selector in Cypress.",
    "section": "api",
    "source_path": "/llm/markdown/api/commands/find.md",
    "version": "3cf5b86b3403f604bdf7f3e35025c3bc3865e02c",
    "updated_at": "2026-05-07T17:44:31.931Z",
    "headings": [
      {
        "id": "api/commands/find#find",
        "text": "find",
        "level": 1
      },
      {
        "id": "api/commands/find#syntax",
        "text": "Syntax",
        "level": 2
      },
      {
        "id": "api/commands/find#usage",
        "text": "Usage",
        "level": 3
      },
      {
        "id": "api/commands/find#arguments",
        "text": "Arguments",
        "level": 3
      },
      {
        "id": "api/commands/find#yields-learn-about-subject-management",
        "text": "Yields Learn about subject management",
        "level": 3
      },
      {
        "id": "api/commands/find#examples",
        "text": "Examples",
        "level": 2
      },
      {
        "id": "api/commands/find#selector",
        "text": "Selector",
        "level": 3
      },
      {
        "id": "api/commands/find#get-lis-within-parent",
        "text": "Get li's within parent",
        "level": 4
      },
      {
        "id": "api/commands/find#rules",
        "text": "Rules",
        "level": 2
      },
      {
        "id": "api/commands/find#requirements-learn-about-chaining-commands",
        "text": "Requirements Learn about chaining commands",
        "level": 3
      },
      {
        "id": "api/commands/find#assertions-learn-about-assertions",
        "text": "Assertions Learn about assertions",
        "level": 3
      },
      {
        "id": "api/commands/find#timeouts-learn-about-timeouts",
        "text": "Timeouts Learn about timeouts",
        "level": 3
      },
      {
        "id": "api/commands/find#command-log",
        "text": "Command Log",
        "level": 2
      },
      {
        "id": "api/commands/find#history",
        "text": "History",
        "level": 2
      },
      {
        "id": "api/commands/find#see-also",
        "text": "See also",
        "level": 2
      }
    ]
  },
  "chunks": [
    {
      "id": "api/commands/find#syntax",
      "doc_id": "api/commands/find",
      "heading": "Syntax",
      "heading_level": 2,
      "content_markdown": "## Syntax\n\n```\n.find(selector).find(selector, options)\n```\n\n### Usage\n\n**Correct Usage**\n\n```\ncy.get('.article').find('footer') // Yield 'footer' within '.article'\n```\n\n**Incorrect Usage**\n\n```\ncy.find('.progress') // Errors, cannot be chained off 'cy'cy.exec('node start').find() // Errors, 'exec' does not yield DOM element\n```\n\n### Arguments\n\n**selector _(String selector)_**\n\nA selector used to filter matching descendent DOM elements.\n\n**options _(Object)_**\n\nPass in an options object to change the default behavior of `.find()`.\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| `timeout` | [`defaultCommandTimeout`](/llm/markdown/app/references/configuration.md#Timeouts) | Time to wait for `.find()` to resolve before [timing out](#Timeouts) |\n| `includeShadowDom` | [`includeShadowDom` config option value](/llm/markdown/app/references/configuration.md#Global) | Whether to traverse shadow DOM boundaries and include elements within the shadow DOM in the yielded results. |\n\n### Yields [Learn about subject management](/llm/markdown/app/core-concepts/introduction-to-cypress.md#Subject-Management)\n\n*   `.find()` yields the new DOM element(s) it found.\n*   `.find()` is a query, and it is _safe_ to chain further commands.\n",
      "section": "api",
      "anchors": [
        "syntax"
      ],
      "path": "/llm/json/chunked/api/commands/find.json",
      "token_estimate": 219
    },
    {
      "id": "api/commands/find#usage",
      "doc_id": "api/commands/find",
      "heading": "Usage",
      "heading_level": 3,
      "content_markdown": "### Usage\n\n**Correct Usage**\n\n```\ncy.get('.article').find('footer') // Yield 'footer' within '.article'\n```\n\n**Incorrect Usage**\n\n```\ncy.find('.progress') // Errors, cannot be chained off 'cy'cy.exec('node start').find() // Errors, 'exec' does not yield DOM element\n```\n",
      "section": "api",
      "anchors": [
        "usage"
      ],
      "path": "/llm/json/chunked/api/commands/find.json",
      "token_estimate": 44
    },
    {
      "id": "api/commands/find#arguments",
      "doc_id": "api/commands/find",
      "heading": "Arguments",
      "heading_level": 3,
      "content_markdown": "### Arguments\n\n**selector _(String selector)_**\n\nA selector used to filter matching descendent DOM elements.\n\n**options _(Object)_**\n\nPass in an options object to change the default behavior of `.find()`.\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| `timeout` | [`defaultCommandTimeout`](/llm/markdown/app/references/configuration.md#Timeouts) | Time to wait for `.find()` to resolve before [timing out](#Timeouts) |\n| `includeShadowDom` | [`includeShadowDom` config option value](/llm/markdown/app/references/configuration.md#Global) | Whether to traverse shadow DOM boundaries and include elements within the shadow DOM in the yielded results. |\n",
      "section": "api",
      "anchors": [
        "arguments"
      ],
      "path": "/llm/json/chunked/api/commands/find.json",
      "token_estimate": 129
    },
    {
      "id": "api/commands/find#rules",
      "doc_id": "api/commands/find",
      "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*   `.find()` requires being chained off a command that yields DOM element(s).\n\n### Assertions [Learn about assertions](/llm/markdown/app/core-concepts/introduction-to-cypress.md#Assertions)\n\n*   `.find()` will automatically [retry](/llm/markdown/app/core-concepts/retry-ability.md) until the element(s) [exist in the DOM](/llm/markdown/app/core-concepts/introduction-to-cypress.md#Implicit-Assertions).\n*   `.find()` will automatically [retry](/llm/markdown/app/core-concepts/retry-ability.md) until all chained assertions have passed.\n\n### Timeouts [Learn about timeouts](/llm/markdown/app/core-concepts/introduction-to-cypress.md#Timeouts)\n\n*   `.find()` can time out waiting for the element(s) to [exist in the DOM](/llm/markdown/app/core-concepts/introduction-to-cypress.md#Implicit-Assertions).\n*   `.find()` can time out waiting for assertions you've added to pass.\n",
      "section": "api",
      "anchors": [
        "rules"
      ],
      "path": "/llm/json/chunked/api/commands/find.json",
      "token_estimate": 105
    },
    {
      "id": "api/commands/find#timeouts-learn-about-timeouts",
      "doc_id": "api/commands/find",
      "heading": "Timeouts Learn about timeouts",
      "heading_level": 3,
      "content_markdown": "### Timeouts [Learn about timeouts](/llm/markdown/app/core-concepts/introduction-to-cypress.md#Timeouts)\n\n*   `.find()` can time out waiting for the element(s) to [exist in the DOM](/llm/markdown/app/core-concepts/introduction-to-cypress.md#Implicit-Assertions).\n*   `.find()` can time out waiting for assertions you've added to pass.\n",
      "section": "api",
      "anchors": [
        "timeouts-learn-about-timeouts"
      ],
      "path": "/llm/json/chunked/api/commands/find.json",
      "token_estimate": 41
    },
    {
      "id": "api/commands/find#command-log",
      "doc_id": "api/commands/find",
      "heading": "Command Log",
      "heading_level": 2,
      "content_markdown": "## Command Log\n\n**_Find the li's within the nav_**\n\n```\ncy.get('.left-nav>.nav').find('>li')\n```\n\nThe commands above will display in the Command Log as:\n\nWhen clicking on the `find` command within the command log, the console outputs the following:\n",
      "section": "api",
      "anchors": [
        "command-log"
      ],
      "path": "/llm/json/chunked/api/commands/find.json",
      "token_estimate": 49
    }
  ]
}