# 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="/files/V4qYJcM29gUgoXhbXLVM" 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/generic/loops-and-condition-operations-1/endif.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.
