# Collapse Tree

This is a pre-built action available under the **Captured Tree Element** from the **SAP GUI Application**. The functionality of this action in Avo Assure is to collapse an expanded tree.

### **Syntax**

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

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

**Output Value**

| Argument                                                      | Description                                                                |
| ------------------------------------------------------------- | -------------------------------------------------------------------------- |
| \<Dynamic Variable> (Optional);\<Dynamic Variable> (Optional) | This dynamic variable holds the execution status as **True** or **False**. |

**Example**

**Collapses all expanded nodes in the SAP GUI tree**

The **CollapseTree** action collapses all expanded nodes in the SAP GUI tree structure.

<figure><img src="https://2174257472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk8QZzXZMIJSStKAzDSTu%2Fuploads%2FEhm4g5BT2FwvkSvunMd9%2Fimage.png?alt=media&#x26;token=9e7cd417-005a-4222-9e80-48159d52ebe3" alt=""><figcaption></figcaption></figure>
