# Close all Sub Windows

This is a **pre-built Action** located under the **@Browser Element,** instructs Avo Assure to **close one or more sub-browser windows** (pop-ups or child tabs) during debugging or execution. The behavior depends on the value provided in the **Input Value** field, and the status is stored in a dynamic variable.

{% hint style="warning" %}
**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><em>(optional)</em></p></td><td>Closes <strong>all</strong> sub-browser windows except the currently active window.</td><td></td></tr><tr><td>&#x3C;window number 1; window number 2…> <em>(optional)</em></td><td>Closes the specified sub-browser windows. Multiple windows can be separated using a semicolon (e.g., 2;3;4).</td><td></td></tr></tbody></table>

&#x20;**Output Value:**

<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>The dynamic variable holds the status as <strong>True</strong> or <strong>False</strong>.</td><td></td></tr></tbody></table>

&#x20;**Example**

**Closes specific sub-windows, and stores the result in the dynamic variable.**

The **Close All Sub Windows** action accepts an optional value in the Input Value column **(e.g., windows 2 and 3),** to determine which sub-windows to close. The action closes either the specified window numbers or all child windows, depending on the input. The output status is stored in the **{CloseSubWinStatus}** variable with the following meanings:

* **True** - The specified sub-windows were closed successfully.
* **False** - One or more sub-windows failed to close, or an error occurred.

<figure><img src="/files/eOd9EpuqDIrboMfpFfhH" 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/web/browser/close-all-sub-windows.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.
