---
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: docs/ui-coverage/configuration/additionalinteractioncommands.mdx
version: 3cf5b86b3403f604bdf7f3e35025c3bc3865e02c
updated_at: '2026-05-07T17:44:31.931Z'
---
# additionalInteractionCommands

UI Coverage automatically tracks how elements are used in tests using a predefined set of [Cypress interaction commands](/llm/markdown/ui-coverage/core-concepts/interactivity.md#Interaction-Commands) such as `click`, `type`, `dblclick`, and more.

The `additionalInteractionCommands` configuration allows you to extend this default set. You can specify custom command types that should also be recognized as interactions, which can increase the range of actions that are counted towards UI Coverage

## Why use additionalInteractionCommands?

*   **Custom command support**: Track interactions from custom Cypress commands that aren't included in the default set.
*   **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.
*   **Enhanced reporting**: Improve the accuracy of your UI Coverage reports by including all relevant interaction types.

## Syntax

```
{  "uiCoverage": {    "additionalInteractionCommands": [      string    ]  }}
```

### Options

The `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.

| Option | Required | Default | Description |
| --- | --- | --- | --- |
| `additionalInteractionCommands` | Optional | `[]` | An array of command names (strings) that should be recognized as interaction commands in addition to the defaults. |

## Examples

### Adding custom interaction commands

#### Config

```
{  "uiCoverage": {    "additionalInteractionCommands": ["customClick", "dragAndDrop", "swipeLeft"]  }}
```

#### Usage in tests

```
// 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()
```

### Adding third-party library commands

#### Config

```
{  "uiCoverage": {    "additionalInteractionCommands": ["realClick", "realType", "realHover"]  }}
```

#### Usage in tests

```
// 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()
```

## Notes

*   Command names are case-sensitive and must match exactly as they appear in your test code.
*   The additional commands are merged with the default interaction commands, the default commands are not replaced.
*   Only commands that actually interact with DOM elements should be included in this configuration.
*   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).
