mcp iframe updates

This commit is contained in:
Josh at WLTechBlog
2025-08-16 07:13:33 -05:00
parent cf34368901
commit e1f2c45c3a
11 changed files with 239 additions and 13 deletions

View File

@@ -116,6 +116,7 @@ func main() {
// switch-iframe flags
switchIframeTabID := switchIframeCmd.String("tab", "", "Tab ID to switch iframe context in (optional, uses current tab if not specified)")
switchIframeSelector := switchIframeCmd.String("selector", "", "CSS selector for the iframe element")
switchIframeTimeout := switchIframeCmd.Int("timeout", 5, "Timeout in seconds for iframe switching")
switchIframeHost := switchIframeCmd.String("host", "localhost", "Daemon host")
switchIframePort := switchIframeCmd.Int("port", 8989, "Daemon port")
@@ -366,7 +367,7 @@ func main() {
c := client.NewClient(*switchIframeHost, *switchIframePort)
// Switch to iframe
err := c.SwitchToIframe(*switchIframeTabID, *switchIframeSelector)
err := c.SwitchToIframe(*switchIframeTabID, *switchIframeSelector, *switchIframeTimeout)
if err != nil {
fmt.Fprintf(os.Stderr, "Error: %v\n", err)
os.Exit(1)