> 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-frame.md).

# Switch Frame

Switch frame moves focus into an iframe so later steps act inside that frame. Use it before Touch, Set value, or Checks that target content inside the iframe.

![Switch frame Test Step](https://app.does.qa/screenshots/node/action_switch_frame.png)

## When to use it

* Enter an embedded payment, consent, or editor iframe before interacting with it.
* Return with [Switch to parent frame](/test-steps/runner/switch-to-parent-frame.md) when the journey continues on the main page.

## Example Flow

Switch into the iframe, interact, then return to the parent frame.

![Switch frame, Touch, Switch to parent frame](/files/PDBVqgHWHy5PvnsRvMI6)

## Configure

### Basics

| Field       | What to set                                          |
| ----------- | ---------------------------------------------------- |
| **Element** | The iframe [Element](/elements/creating-elements.md) |

{% hint style="info" %}
**Pro tip:** Create the iframe Element from the Switch frame step so the Selector stays tied to the frame you enter.
{% endhint %}

## Related

* [Switch to parent frame](/test-steps/runner/switch-to-parent-frame.md)
* [Touch](/test-steps/action/touch.md)
* [Test tabs, windows, and frames](/guides/test-tabs-windows-and-frames.md)
* [Runner](/test-steps/runner.md)

**Tags:** `action`, `switch`, `frame`, `iframe`, `inner`, `child`
