# Create, Edit and Delete Custom Action

## Creating Custom Action

#### Step to create Custom Action:

1. On the **Home** page, select **Design Studio** and navigate to **Test Case** window.&#x20;
2. Select **Test Case** and select desired **Test Step Group.**
3. Select any **Test Step**, open **Action** dropdown and click **+ Add Action** button. **Create Custom Action** pop-up window appears.&#x20;

<figure><img src="/files/32yXilxpYdCeDBNyqJrm" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Note:** Custom actions can be created for each element type, including captured elements.
{% endhint %}

4. Enter **Name** for action, enter **Description** of action and add **Input syntax (Optional)** of the action.

{% hint style="info" %}
**Note:** The **Name** and **Description** cannot be edited once the custom action is created.
{% endhint %}

<figure><img src="/files/5LCpS6MuCcSU7H1Bg1vU" alt=""><figcaption></figcaption></figure>

5. Select Code Language (**JavaScript/Python**).

<figure><img src="/files/LXCrv3ZlyAbj09vYJKw5" alt=""><figcaption></figcaption></figure>

6. Type code for custom action in **Code Editor** and select **Create Custom Action**.

{% hint style="info" %}
**Note:** For understanding **input and output handling** process refer to [Handling Input and Output Variables.](/avo-assure/actions/custom-action/handling-input-and-output-variables.md)
{% endhint %}

<figure><img src="/files/cnuTSoyYPmNqaPvG86fT" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Note:** The parameter passed in the input syntax field should match the parameters passed in the code snippe&#x74;*.*
{% endhint %}

<figure><img src="/files/nV2aTFX4tYLNmEYkTdxL" alt=""><figcaption></figcaption></figure>

## Editing Custom Action

Edit Custom Action allows to modify the code of the existing custom actions.

#### Steps to edit custom action in Avo Assure:

1. On the **Home** page, select **Design Studio** and navigate to **Test Case** window.&#x20;
2. Select **Test Case** and select desired **Test Step Group.**
3. Select **Element** from dropdown then open **Action** dropdown.
4. Select **Edit** icon located in front of Custom Action, **Edit Keyword** window will be displayed.&#x20;

<figure><img src="/files/Vuk4TwBdctdWUd9d8PMt" alt=""><figcaption></figcaption></figure>

5. Edit the code from **Code Editor** field according to requirement and click **Save Changes** button.

<figure><img src="/files/AVRaRdbm7uXQRfTAnlXB" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Note:** The **Name** and **Description** cannot be edited once the custom action is created.
{% endhint %}

## Deleting Custom Action

The Deleting option allows you to remove a custom action from the list of existing actions. &#x20;

{% hint style="info" %}
**Note:** Only Quality Managers with the Admin as secondary role can delete custom actions.&#x20;
{% endhint %}

#### Steps to Delete a Custom Action in Avo Assure:&#x20;

1. On the **Home** page, under **Projects**, select the required project. &#x20;
2. Select **Desing Studio** and navigate to **Testcase** tab.&#x20;
3. From the **Element** dropdown, select the required element.&#x20;
4. From the **Action** dropdown, select the required custom action for which you want to delete.
5. Select the **Edit** icon located in front of the Custom Action. The Edit Keyword window appears.&#x20;
6. Select **Delete**, and a confirmation popup will appear.&#x20;

<figure><img src="/files/hXwWildGOqxXzPWmHn2m" alt=""><figcaption></figcaption></figure>

7. Select **Confirm** to delete the created custom action.

<figure><img src="/files/DzM9SK6BMRH2o0tPlRwn" alt=""><figcaption></figcaption></figure>

8. Selected Custom Action is currently in use, a **Cannot Delete Custom Action** dialog displays the **Project**, **Impacted Testcases**, **Impacted Reused Test Step Groups**, and **Impacted Recovery Test Step Groups** where the action is used.&#x20;

{% hint style="info" %}
&#x20;**Note:**&#x20;

* You can **Export** the details of the impacted Testcases or projects to a CSV file for reference.&#x20;
* The **Confirm** button will remain disabled until the Custom Action is no longer used anywhere.&#x20;
* The **Cancel** button allows you to close the popup without making any changes.&#x20;
* The Custom Action cannot be deleted if it is used in any Testcase/Reusable Library/Recovery Test Steps. To delete it, you must first remove it from all associated fields.&#x20;
  {% endhint %}

<figure><img src="/files/QQZ6n01ZlWAWX9cAnsuk" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.avoautomation.com/avo-assure/actions/custom-action/create-edit-and-delete-custom-action.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
