# EndIf

This action in Avo Assure is available under the **@Generic Element**. Its functionality is to close the If condition statement after executing the conditional logic. Without the **EndIf** action, the If condition cannot execute correctly and results in a dangling error.

## Syntax

**Input Value**: N/A&#x20;

| Argument | Description    |
| -------- | -------------- |
| N/A      | Not Applicable |

**Output Value**: N/A

| Argument | Description    |
| -------- | -------------- |
| N/A      | Not Applicable |

### Example: Marking the End of a Conditional Part

In this example, we explain how to mark the end of an **If** condition during test execution using the **EndIf** action.

* **Action**: EndIf
* **Input Value**: Not Applicable
  * The **EndIf** action does not require any input value. It is used to indicate the completion of an **If**, **ElseIf**, or **Else** condition part within the test execution flow.
* **Logical Explanation**: The **EndIf** action acts as an end point that marks the completion of a conditional part. When this action executes, it informs Avo Assure that the entire conditional structure, whether it is an If, Else If, or Else part, is fully processed. This helps maintain the correct logical flow, ensuring that the execution proceeds properly to the next test steps outside the conditional part.

<figure><img src="https://2174257472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk8QZzXZMIJSStKAzDSTu%2Fuploads%2Fngn2ym2E1LzRpkiFuuZ3%2Fimage.png?alt=media&#x26;token=1c6da38a-2534-43d2-9b82-d1e2bc6b2ecf" alt=""><figcaption></figcaption></figure>
