> For the complete documentation index, see [llms.txt](https://docs.does.qa/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.does.qa/test-steps/runner/switch-window.md). Agents can also search and read this documentation through its [MCP server](https://docs.does.qa/~gitbook/mcp).

# Switch Window

Switch the current browser window.

Switch Window moves focus to another browser window or tab that matches the domain or title you provide. Use it after a link opens a popup or when the Flow continues in a new tab.

![Switch window Test Step](https://static.does.qa/assets/nodes/action_switch_window.png)

## When to use it

* Follow a link that opens a sign-in or payment window, then continue steps there.
* Return focus using a partial domain or title match when several tabs are open.
* Pair with [Switch Frame](https://docs.does.qa/test-steps/runner/switch-frame.md) when the target content lives inside an iframe.

## Configure

### Basics

| Field              | What to set                                                                                 |
| ------------------ | ------------------------------------------------------------------------------------------- |
| **Domain / Title** | Text and/or [Values](https://docs.does.qa/values/value-store.md) to match the target window |

### Advanced

| Field                                 | What to set                                                              |
| ------------------------------------- | ------------------------------------------------------------------------ |
| **Status on fail**                    | [Failed Status](https://docs.does.qa/test-step-options/failed-status.md) |
| **When should screenshots be taken?** | `Always` or `On Failures` (default)                                      |

## Related

* [Switch Frame](https://docs.does.qa/test-steps/runner/switch-frame.md)
* [Switch to parent frame](https://docs.does.qa/test-steps/runner/switch-to-parent-frame.md)
* [Test tabs, windows, and frames](https://docs.does.qa/guides/test-tabs-windows-and-frames.md)
* [Runner](https://docs.does.qa/test-steps/runner.md)

**Tags:** `action`, `switch`, `window`, `popup`, `pop-up`
