switch_frame
Switch WebDriver focus to an iframe using a CSS or XPath selector. Omit the selector to return to the top-level frame. All subsequent actions apply within the selected frame.
Instructions
Switches WebDriver frame context into an iframe by CSS/XPath selector, or back to top-level if selector is omitted. Changes persist — all subsequent click_element, set_value, get_elements calls operate within the switched frame until you switch back. Waits up to 5s for the iframe. Browser-only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| selector | No | CSS/XPath selector for the iframe element. Omit to switch back to the top-level frame. |