{
  "doc": {
    "id": "ui-coverage/configuration/additionalinteractioncommands",
    "title": "Additional Interaction Commands | Cypress UI Coverage",
    "description": "The `additionalInteractionCommands` configuration property allows users to extend the default set of interaction command types recognized by UI Coverage.",
    "section": "ui-coverage",
    "source_path": "/llm/markdown/ui-coverage/configuration/additionalinteractioncommands.md",
    "version": "48b03b5502f7aea1d0454750cce208f775403542",
    "updated_at": "2026-05-20T19:00:20.270Z",
    "headings": [
      {
        "id": "ui-coverage/configuration/additionalinteractioncommands#additionalinteractioncommands",
        "text": "additionalInteractionCommands",
        "level": 1
      },
      {
        "id": "ui-coverage/configuration/additionalinteractioncommands#why-use-additionalinteractioncommands",
        "text": "Why use additionalInteractionCommands?",
        "level": 2
      },
      {
        "id": "ui-coverage/configuration/additionalinteractioncommands#syntax",
        "text": "Syntax",
        "level": 2
      },
      {
        "id": "ui-coverage/configuration/additionalinteractioncommands#options",
        "text": "Options",
        "level": 3
      },
      {
        "id": "ui-coverage/configuration/additionalinteractioncommands#examples",
        "text": "Examples",
        "level": 2
      },
      {
        "id": "ui-coverage/configuration/additionalinteractioncommands#adding-custom-interaction-commands",
        "text": "Adding custom interaction commands",
        "level": 3
      },
      {
        "id": "ui-coverage/configuration/additionalinteractioncommands#config",
        "text": "Config",
        "level": 4
      },
      {
        "id": "ui-coverage/configuration/additionalinteractioncommands#usage-in-tests",
        "text": "Usage in tests",
        "level": 4
      },
      {
        "id": "ui-coverage/configuration/additionalinteractioncommands#adding-third-party-library-commands",
        "text": "Adding third-party library commands",
        "level": 3
      },
      {
        "id": "ui-coverage/configuration/additionalinteractioncommands#config",
        "text": "Config",
        "level": 4
      },
      {
        "id": "ui-coverage/configuration/additionalinteractioncommands#usage-in-tests",
        "text": "Usage in tests",
        "level": 4
      },
      {
        "id": "ui-coverage/configuration/additionalinteractioncommands#notes",
        "text": "Notes",
        "level": 2
      }
    ]
  },
  "chunks": [
    {
      "id": "ui-coverage/configuration/additionalinteractioncommands#why-use-additionalinteractioncommands",
      "doc_id": "ui-coverage/configuration/additionalinteractioncommands",
      "heading": "Why use additionalInteractionCommands?",
      "heading_level": 2,
      "content_markdown": "## Why use additionalInteractionCommands?\n\n*   **Custom command support**: Track interactions from custom Cypress commands that aren't included in the default set.\n*   **Third-party library support**: Ensure interactions from third-party testing libraries (such as [`cypress-real-events`](#Adding-third-party-library-commands)) are properly recognized and tracked.\n*   **Enhanced reporting**: Improve the accuracy of your UI Coverage reports by including all relevant interaction types.\n",
      "section": "ui-coverage",
      "anchors": [
        "why-use-additionalinteractioncommands"
      ],
      "path": "/llm/json/chunked/ui-coverage/configuration/additionalinteractioncommands.json",
      "token_estimate": 75
    },
    {
      "id": "ui-coverage/configuration/additionalinteractioncommands#syntax",
      "doc_id": "ui-coverage/configuration/additionalinteractioncommands",
      "heading": "Syntax",
      "heading_level": 2,
      "content_markdown": "## Syntax\n\n```\n{  \"uiCoverage\": {    \"additionalInteractionCommands\": [      string    ]  }}\n```\n\n### Options\n\nThe `additionalInteractionCommands` property accepts an array of strings, where each string represents a command name that should be treated as an interaction command by UI Coverage.\n\n| Option | Required | Default | Description |\n| --- | --- | --- | --- |\n| `additionalInteractionCommands` | Optional | `[]` | An array of command names (strings) that should be recognized as interaction commands in addition to the defaults. |\n",
      "section": "ui-coverage",
      "anchors": [
        "syntax"
      ],
      "path": "/llm/json/chunked/ui-coverage/configuration/additionalinteractioncommands.json",
      "token_estimate": 112
    },
    {
      "id": "ui-coverage/configuration/additionalinteractioncommands#options",
      "doc_id": "ui-coverage/configuration/additionalinteractioncommands",
      "heading": "Options",
      "heading_level": 3,
      "content_markdown": "### Options\n\nThe `additionalInteractionCommands` property accepts an array of strings, where each string represents a command name that should be treated as an interaction command by UI Coverage.\n\n| Option | Required | Default | Description |\n| --- | --- | --- | --- |\n| `additionalInteractionCommands` | Optional | `[]` | An array of command names (strings) that should be recognized as interaction commands in addition to the defaults. |\n",
      "section": "ui-coverage",
      "anchors": [
        "options"
      ],
      "path": "/llm/json/chunked/ui-coverage/configuration/additionalinteractioncommands.json",
      "token_estimate": 96
    },
    {
      "id": "ui-coverage/configuration/additionalinteractioncommands#examples",
      "doc_id": "ui-coverage/configuration/additionalinteractioncommands",
      "heading": "Examples",
      "heading_level": 2,
      "content_markdown": "## Examples\n\n### Adding custom interaction commands\n\n#### Config\n\n```\n{  \"uiCoverage\": {    \"additionalInteractionCommands\": [\"customClick\", \"dragAndDrop\", \"swipeLeft\"]  }}\n```\n\n#### Usage in tests\n\n```\n// These custom commands will now be tracked as interactionscy.get('[data-testid=\"submit-button\"]').customClick()cy.get('[data-testid=\"draggable\"]').dragAndDrop()cy.get('[data-testid=\"carousel\"]').swipeLeft()\n```\n\n### Adding third-party library commands\n\n#### Config\n\n```\n{  \"uiCoverage\": {    \"additionalInteractionCommands\": [\"realClick\", \"realType\", \"realHover\"]  }}\n```\n\n#### Usage in tests\n\n```\n// Commands from cypress-real-events plugin will be trackedcy.get('[data-cy=\"button\"]').realClick()cy.get('[data-cy=\"input\"]).realType('Hello World')cy.get('[data-cy=\"tooltip-trigger\"]').realHover()\n```\n",
      "section": "ui-coverage",
      "anchors": [
        "examples"
      ],
      "path": "/llm/json/chunked/ui-coverage/configuration/additionalinteractioncommands.json",
      "token_estimate": 89
    },
    {
      "id": "ui-coverage/configuration/additionalinteractioncommands#adding-custom-interaction-commands",
      "doc_id": "ui-coverage/configuration/additionalinteractioncommands",
      "heading": "Adding custom interaction commands",
      "heading_level": 3,
      "content_markdown": "### Adding custom interaction commands\n\n#### Config\n\n```\n{  \"uiCoverage\": {    \"additionalInteractionCommands\": [\"customClick\", \"dragAndDrop\", \"swipeLeft\"]  }}\n```\n\n#### Usage in tests\n\n```\n// These custom commands will now be tracked as interactionscy.get('[data-testid=\"submit-button\"]').customClick()cy.get('[data-testid=\"draggable\"]').dragAndDrop()cy.get('[data-testid=\"carousel\"]').swipeLeft()\n```\n",
      "section": "ui-coverage",
      "anchors": [
        "adding-custom-interaction-commands"
      ],
      "path": "/llm/json/chunked/ui-coverage/configuration/additionalinteractioncommands.json",
      "token_estimate": 44
    },
    {
      "id": "ui-coverage/configuration/additionalinteractioncommands#adding-third-party-library-commands",
      "doc_id": "ui-coverage/configuration/additionalinteractioncommands",
      "heading": "Adding third-party library commands",
      "heading_level": 3,
      "content_markdown": "### Adding third-party library commands\n\n#### Config\n\n```\n{  \"uiCoverage\": {    \"additionalInteractionCommands\": [\"realClick\", \"realType\", \"realHover\"]  }}\n```\n\n#### Usage in tests\n\n```\n// Commands from cypress-real-events plugin will be trackedcy.get('[data-cy=\"button\"]').realClick()cy.get('[data-cy=\"input\"]).realType('Hello World')cy.get('[data-cy=\"tooltip-trigger\"]').realHover()\n```\n",
      "section": "ui-coverage",
      "anchors": [
        "adding-third-party-library-commands"
      ],
      "path": "/llm/json/chunked/ui-coverage/configuration/additionalinteractioncommands.json",
      "token_estimate": 43
    },
    {
      "id": "ui-coverage/configuration/additionalinteractioncommands#notes",
      "doc_id": "ui-coverage/configuration/additionalinteractioncommands",
      "heading": "Notes",
      "heading_level": 2,
      "content_markdown": "## Notes\n\n*   Command names are case-sensitive and must match exactly as they appear in your test code.\n*   The additional commands are merged with the default interaction commands, the default commands are not replaced.\n*   Only commands that actually interact with DOM elements should be included in this configuration.\n*   Custom commands must log a snapshot that references the subject element. This ensures that the command renders element highlights in Cypress open mode/Test Replay, and also ensures that UI Coverage can properly attribute the interaction to the expected element. More information regarding Custom Commands can be found [here](/llm/markdown/api/cypress-api/custom-commands.md).\n",
      "section": "ui-coverage",
      "anchors": [
        "notes"
      ],
      "path": "/llm/json/chunked/ui-coverage/configuration/additionalinteractioncommands.json",
      "token_estimate": 132
    }
  ]
}