mcp iframe updates
This commit is contained in:
@@ -538,6 +538,11 @@ func main() {
|
||||
"type": "string",
|
||||
"description": "Tab ID (optional)",
|
||||
},
|
||||
"timeout": map[string]any{
|
||||
"type": "integer",
|
||||
"description": "Timeout in seconds",
|
||||
"default": 5,
|
||||
},
|
||||
},
|
||||
Required: []string{"action"},
|
||||
},
|
||||
@@ -551,6 +556,7 @@ func main() {
|
||||
action := getStringParam(params, "action", "")
|
||||
selector := getStringParam(params, "selector", "")
|
||||
tab := getStringParam(params, "tab", cremoteServer.currentTab)
|
||||
timeout := getIntParam(params, "timeout", 5)
|
||||
|
||||
if action == "" {
|
||||
return nil, fmt.Errorf("action parameter is required")
|
||||
@@ -567,7 +573,7 @@ func main() {
|
||||
if selector == "" {
|
||||
return nil, fmt.Errorf("selector parameter is required for enter action")
|
||||
}
|
||||
err = cremoteServer.client.SwitchToIframe(tab, selector)
|
||||
err = cremoteServer.client.SwitchToIframe(tab, selector, timeout)
|
||||
cremoteServer.iframeMode = true
|
||||
message = fmt.Sprintf("Entered iframe: %s", selector)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user