mcp-playwright icon indicating copy to clipboard operation
mcp-playwright copied to clipboard

Multiple Chromium Launches, Need Sticky Window

Open ajoslin103 opened this issue 8 months ago • 1 comments

By installing the playwright and puppeteer-core at the root of the n8n repo pnpm add -w playwright puppeteer-core my n8n instance (launched with npx n8n) is able to call for the tools and then start using them

So I've Playwright working in this workflow, but it's not re-using the first window - each tool execution is starting a new window.

Is there anything that is returned from an Execute Tool call that I can put into other calls so that I run all the Tools against the same browser instance?

ajoslin103 avatar Mar 22 '25 02:03 ajoslin103

When the AI calls the playwright-navigate tool it sends these inputs:

{
  "toolname": "playwright_navigate",
  "Tool_Parameters": {
    "url": "https://www.postb.in/"
  }
}

The Playwright MCP Server opens a Chromium Instance which navigates to the requested page and returns this info

{
  "toolname": "playwright_navigate",
  "Tool_Parameters": {
    "url": "https://www.postb.in/"
  }
}

I'll go read up on Playwright and look for something to support keeping all executions together.

Question: when used with Claude, are all requests sent to the same browser instance?

ajoslin103 avatar Mar 23 '25 18:03 ajoslin103

I'm having the same issue when used with google.adk

AnnaAKozina avatar May 04 '25 14:05 AnnaAKozina

I've also encountered this issue and am searching for a solution.

jrkeen avatar May 06 '25 08:05 jrkeen

@ajoslin103 Has there been any progress, or are there other solutions? Thank you.

jrkeen avatar May 06 '25 08:05 jrkeen

I've also encountered this issue and am searching for a solution.

I solved this problem by using the supergateway and replacing the stdio mode with SSE.

npx -y supergateway --port 8768 --stdio "npx -y @executeautomation/playwright-mcp-server"

Image

jrkeen avatar May 06 '25 09:05 jrkeen

I switch to this mcp server - worked well for me

https://github.com/microsoft/playwright-mcp

ajoslin103 avatar May 06 '25 16:05 ajoslin103