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.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "switch_to_frame"
}
}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 |