{
  "doc": {
    "id": "ui-coverage/core-concepts/element-identification",
    "title": "Uniquely identify test elements | Cypress UI Coverage",
    "description": "Elements are uniquely identified across views and snapshots by their HTML attributes, location, and other signals in the DOM.",
    "section": "ui-coverage",
    "source_path": "/llm/markdown/ui-coverage/core-concepts/element-identification.md",
    "version": "3cf5b86b3403f604bdf7f3e35025c3bc3865e02c",
    "updated_at": "2026-05-07T17:44:31.931Z",
    "headings": [
      {
        "id": "ui-coverage/core-concepts/element-identification#element-identification",
        "text": "Element Identification",
        "level": 1
      },
      {
        "id": "ui-coverage/core-concepts/element-identification#significant-attributes-for-identification",
        "text": "Significant attributes for identification",
        "level": 2
      },
      {
        "id": "ui-coverage/core-concepts/element-identification#configuring-element-identification",
        "text": "Configuring element identification",
        "level": 2
      },
      {
        "id": "ui-coverage/core-concepts/element-identification#attribute-filters",
        "text": "Attribute filters",
        "level": 3
      },
      {
        "id": "ui-coverage/core-concepts/element-identification#significant-attributes",
        "text": "Significant attributes",
        "level": 3
      }
    ]
  },
  "chunks": [
    {
      "id": "ui-coverage/core-concepts/element-identification#significant-attributes-for-identification",
      "doc_id": "ui-coverage/core-concepts/element-identification",
      "heading": "Significant attributes for identification",
      "heading_level": 2,
      "content_markdown": "## Significant attributes for identification\n\nCertain attributes are prioritized by UI Coverage for element identification and grouping. These include:\n\n*   `data-cy`\n*   `data-test`\n*   `data-testid`\n*   `data-test-id`\n*   `data-qa`\n*   `row-id`\n*   `id`\n*   `name`\n\nBy using these attributes consistently in your application, you can improve the accuracy of UI Coverage tracking.\n",
      "section": "ui-coverage",
      "anchors": [
        "significant-attributes-for-identification"
      ],
      "path": "/llm/json/chunked/ui-coverage/core-concepts/element-identification.json",
      "token_estimate": 69
    },
    {
      "id": "ui-coverage/core-concepts/element-identification#configuring-element-identification",
      "doc_id": "ui-coverage/core-concepts/element-identification",
      "heading": "Configuring element identification",
      "heading_level": 2,
      "content_markdown": "## Configuring element identification\n\n### Attribute filters\n\nExclude irrelevant or dynamically generated attributes to reduce noise in UI Coverage reports. For example:\n\n```\n{  \"uiCoverage\": {    \"attributeFilters\": [      {        \"attribute\": \"id\",        \"value\": \":r.*:\",        \"include\": false      }    ]  }}\n```\n\nLearn more about attribute filtering in the [Attribute Filters](/llm/markdown/ui-coverage/configuration/attributefilters.md) guide.\n\n### Significant attributes\n\nDefine custom significant attributes to prioritize specific selectors that align with your application’s structure. For example:\n\n```\n{  \"uiCoverage\": {    \"significantAttributes\": [\"data-custom-id\"]  }}\n```\n\nRefer to the [Significant Attributes](/llm/markdown/ui-coverage/configuration/significantattributes.md) guide for detailed instructions.\n",
      "section": "ui-coverage",
      "anchors": [
        "configuring-element-identification"
      ],
      "path": "/llm/json/chunked/ui-coverage/core-concepts/element-identification.json",
      "token_estimate": 113
    },
    {
      "id": "ui-coverage/core-concepts/element-identification#attribute-filters",
      "doc_id": "ui-coverage/core-concepts/element-identification",
      "heading": "Attribute filters",
      "heading_level": 3,
      "content_markdown": "### Attribute filters\n\nExclude irrelevant or dynamically generated attributes to reduce noise in UI Coverage reports. For example:\n\n```\n{  \"uiCoverage\": {    \"attributeFilters\": [      {        \"attribute\": \"id\",        \"value\": \":r.*:\",        \"include\": false      }    ]  }}\n```\n\nLearn more about attribute filtering in the [Attribute Filters](/llm/markdown/ui-coverage/configuration/attributefilters.md) guide.\n",
      "section": "ui-coverage",
      "anchors": [
        "attribute-filters"
      ],
      "path": "/llm/json/chunked/ui-coverage/core-concepts/element-identification.json",
      "token_estimate": 60
    },
    {
      "id": "ui-coverage/core-concepts/element-identification#significant-attributes",
      "doc_id": "ui-coverage/core-concepts/element-identification",
      "heading": "Significant attributes",
      "heading_level": 3,
      "content_markdown": "### Significant attributes\n\nDefine custom significant attributes to prioritize specific selectors that align with your application’s structure. For example:\n\n```\n{  \"uiCoverage\": {    \"significantAttributes\": [\"data-custom-id\"]  }}\n```\n\nRefer to the [Significant Attributes](/llm/markdown/ui-coverage/configuration/significantattributes.md) guide for detailed instructions.\n",
      "section": "ui-coverage",
      "anchors": [
        "significant-attributes"
      ],
      "path": "/llm/json/chunked/ui-coverage/core-concepts/element-identification.json",
      "token_estimate": 48
    }
  ]
}