# Configure Custom Property

### Ways to build Custom Property &#x20;

**A.** Custom 1

**B.** Custom 2&#x20;

#### **A. Steps to Configure Custom 1 Property form Avo Assure Client**&#x20;

1. Launch the **Avo Assure Client.**&#x20;
2. Navigate to the **Configuration** tab.&#x20;
3. Select **Settings** option.&#x20;
4. Enter **Element Property** in the **Custom Property** field.&#x20;

{% hint style="danger" %}
**Note:**\
&#x20;Enter the unique property of the Element (e.g., data-testid, data-val-required, custom-id).&#x20;
{% endhint %}

<figure><img src="https://2174257472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk8QZzXZMIJSStKAzDSTu%2Fuploads%2F2gB9MYZkRcxPg79wEZ3m%2Fimage.png?alt=media&#x26;token=b5fe73d2-fada-4520-b60f-7fcdf631fefb" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="warning" %}
***Note:** When a custom property is defined in the Avo Assure Client settings, it is automatically captured during element identification—**provided the element contains that property**. Additionally, the captured custom property is placed **at the top of the priority list** for element identification.*
{% endhint %}

This tells Avo Assure to use this custom property during execution if the usual properties (like id or class) don’t work.

**B. Steps to Configure Custom 2 Property from Element Repository**&#x20;

1. Navigate to the **Element Repository** tab.
2. Select the required element from the repository and click **Edit** icon. The **Details** panel will appear on the right side of the screen.

<figure><img src="https://2174257472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk8QZzXZMIJSStKAzDSTu%2Fuploads%2FZmWFIg3DKIewH8dvbezF%2Fimage.png?alt=media&#x26;token=53234d45-32a6-4657-a02a-29746e24bce0" alt=""><figcaption></figcaption></figure>

5. In the **Custom 2 Value** field, enter the unique property of the Element  (e.g., data-testid, data-val-required, custom-id).
6. Click **Save properties** button to apply and save the changes.

<figure><img src="https://2174257472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk8QZzXZMIJSStKAzDSTu%2Fuploads%2F3NrhPNM44ZbrTsdv2Ngs%2Fimage.png?alt=media&#x26;token=754f9c20-55f4-4713-b86a-254c66f47d09" alt=""><figcaption></figcaption></figure>

### How to Use Custom Property with Self-Healing

Avo Assure also supports Self-Healing, which means it can update element properties automatically when something changes in the application. You can use Custom 1 in this self-healing process after doing a simple setup in the Avo Assure Client.

### How It Works During Execution&#x20;

**Once you’ve added the custom property in Avo Assure Client settings, follow the steps below to use it during self-healing**:&#x20;

1. Select the element that is not working during execution.&#x20;
2. Choose both options:&#x20;

* Adjust the broken element’s attributes&#x20;
* Preserve the properties of reprioritized items for subsequent execution&#x20;

**What will happen next**&#x20;

* Avo Assure automatically maps Custom 1 to the previously entered property.&#x20;
* If an element cannot be located using the default properties, the tool falls back on the custom property for identification.&#x20;
* This ensures consistent identification of the same element across test executions.&#x20;
* The test case proceeds without interruption, eliminating the need for manual intervention.&#x20;

{% hint style="warning" %}
***Note:** Make sure the custom property you entered (e.g., data-val-requiredor, maxlength) is used throughout the application by your development team.*&#x20;
{% endhint %}

#### **Example 1: Configure and Use Custom 1 Property**

**Scenario:**

In an application, elements are uniquely identified using the attribute **data-testid**, which is not part of the default properties captured by Avo Assure.

**Input:**

* Property Name to be configured: **data-testid**
* Element captured from the application using Avo Assure Client.

**Expected Result:**

The **data-testid** property is captured as **Custom 1** in the Element Repository and used during execution if default properties fail.

**Output:**

During execution, if the element is not found using **id, name,** or **class**, Avo Assure automatically uses the **data-testid** property defined in Custom 1 to identify the element and continue execution without failure.

#### **Example 2: Configure and Use Custom 2 Property**

**Scenario:**

An element in the application has a unique property **data-val-required.** The default attributes like `id` or **class** are dynamic and unreliable. The tester manually sets **data-val-required** as Custom 2 in the Element Repository.

**Input:**

* Property set in Custom 2: **data-val-required**
* All other attribute values set to **None** in the Element Repository.

**Expected Result:**

Custom 2 is used as the primary identifier to locate the element during execution.

**Output:**

Avo Assure identifies the element using the **data-val-required** value set in Custom 2 and executes the test steps successfully.
