Table of Contents
Note

This documentation describes the v-neos-automation Vue directive for native UI views. This directive is used to set automation test identifiers on DOM elements by writing data-neosAutomationId or data-neosAutomationRepeatIndex attributes that can be used by test automation tools.

v-neos-automation

Sets automation test identifiers on DOM elements. Writes data-neosAutomationId or data-neosAutomationRepeatIndex attributes that can be used by test automation tools.

Import

import { NeosAutomation } from '@neos/design-system'

Syntax

<div v-neos-automation:[arg]="value" />

Arguments & Values

Argument Value type Description
id string \| number Sets data-neosAutomationId on the element
repeat-index number Sets data-neosAutomationRepeatIndex on the element

Usage Examples

Unique element identifier

<button v-neos-automation:id="'save-btn'" label="Save" />

Repeated items in a list

<div v-for="(item, index) in items" :key="item.id">
  <Card v-neos-automation:id="item.id" v-neos-automation:repeat-index="index">
    {{ item.name }}
  </Card>
</div>

Combining both

<input v-neos-automation:id="'email-input'" v-neos-automation:repeat-index="rowIndex" type="text" />