switch_to_frame
Direct browser automation into an iframe using index, name/id, or CSS/XPath selector, enabling subsequent commands to interact with elements inside that frame.
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 |