> 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

Move the Test Case focus into an iframe Element.

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](https://2973996442-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FH10EEO19EDpBHNPowThh%2Fuploads%2Fgit-blob-58408cacff9c6986d30dec7fd106d6e1b803acec%2Fswitch-frame-miniflow-approx.png?alt=media)

## 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`
