# Close all Sub Windows

This is a pre-built Action located under the **@Browser Element**. The functionality of this Action in Avo Assure is to close one or more sub-browser windows during debugging or execution. The result is stored in a dynamic variable for further use during test execution.

{% hint style="info" %}
**Note**: The parent browser window will remain open unless specifically closed using other actions.
{% endhint %}

## **Syntax**

**Input Value**: `<all>(optional)/window number 1;window number 2…>(optional)`&#x20;

<table><thead><tr><th>Argument</th><th>Description</th><th data-hidden></th></tr></thead><tbody><tr><td><p>&#x3C;all> </p><p>(optional)</p></td><td>Provide <strong>all</strong> sub browser windows to close except the currently active one.</td><td></td></tr><tr><td>&#x3C;window number 1; window number 2…> (optional)</td><td>Provide the sub browser windows to close. Separate multiple window numbers using a semicolon (for example, 2;3;4)</td><td></td></tr></tbody></table>

&#x20;**Output Value**: `<Dynamic Variable>(Optional);<Dynamic Variable>(Optional)`

<table><thead><tr><th>Argument</th><th>Description</th><th data-hidden></th></tr></thead><tbody><tr><td>&#x3C;Dynamic Variable>(Optional);&#x3C;Dynamic Variable>(Optional)</td><td>Both dynamic variable stores the status as <strong>True</strong> or <strong>False</strong>.</td><td></td></tr></tbody></table>

### Example: Closing Specific Sub-Windows

In this example, we explain how to close specific sub-windows or all child windows using the **Close All Sub Windows** action.

* **Action**: Close all Sub Windows
* **Input Value**: 2;3
  * The input value, (**2;3**) specifies the sub-window numbers that need to be closed. If no input value is provided, all child windows opened during execution will be closed.
* **Output Value**: {SubWin}
  * The result of closes sub-window operation is stored in the **{SubWin}** dynamic variable, which returns one of the following values:
    * **True**: If the specified sub windows is closed successfully.
    * **False**: If the specified sub windows is not closed successfully.
* **Logical Explanation**: The **Close all Sub Windows** action takes the value from the **Input Value** column (**2;3**) and closes the specified sub windows. If no input is given, it closes all open child windows by default. The execution result is stored in the **{SubWin}** variable as true.

<figure><img src="https://2174257472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk8QZzXZMIJSStKAzDSTu%2Fuploads%2FB7dgTK778dQTv607D0YY%2Fimage.png?alt=media&#x26;token=450386ea-b0e7-4034-b71e-cdaa6e7f08ba" alt=""><figcaption></figcaption></figure>
