switch_to_frame
Switch the active browser context to an iframe by index, name/id, or CSS/XPath selector so subsequent actions target its elements.
Instructions
Switch focus into an iframe. Provide index (integer), name/id (string), or a CSS/XPath selector.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| by | No | css | |
| name | No | Frame name or id attribute | |
| index | No | Frame index | |
| timeout | No | ||
| selector | No | CSS/XPath to locate the iframe element |