executeautomation/mcp-playwright

Unable to Switch to a tab if clicked a link that opens in new tab

Closed this issue · 0 comments

Description
When we have a link or button that will open a new page/tab, we are not able to switch to that tab using MCP server now.

Expected Behavior
When we aske the Ai to do following "find the element with title 'XYZ' and use "click and switch tab" tool to click on it . then MCP server should call a tool and switch the control to that tab.

Approach
We should have a Tool that can wait for the page even to be loaded during the click and then assign to a new page . switch to the new page so that all the operations will happen in the new page.

Image