> ## Documentation Index
> Fetch the complete documentation index at: https://skyvern.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# frame_switch

Switch the working context to an iframe. Exactly one parameter is required.

```python theme={null}
# By CSS selector
await page.frame_switch(selector="#payment-iframe")

# By frame name
await page.frame_switch(name="checkout")

# By index
await page.frame_switch(index=0)
```

## Parameters

| Parameter  | Type  | Required | Description                                 |
| ---------- | ----- | -------- | ------------------------------------------- |
| `selector` | `str` | No       | CSS selector for the iframe element.        |
| `name`     | `str` | No       | The `name` attribute of the iframe.         |
| `index`    | `int` | No       | Zero-based index of the iframe on the page. |

<Note>
  Exactly one of `selector`, `name`, or `index` must be provided.
</Note>

## Returns `dict[str, Any]`

Frame metadata for the switched-to iframe.
