Difference between revisions of "Talk:Playwright"

From NixOS Wiki
Jump to: navigation, search
(Created page with "This might be outdated and maybe unnecessary. I tried to this but the versions of the browsers getting installed are way too old and not compatible with the browsers the node...")
 
(Add mcp instructions)
 
Line 5: Line 5:
  
 
Then execute `playwright test` or whatever was/is configured as script in packages.json
 
Then execute `playwright test` or whatever was/is configured as script in packages.json
 +
 +
-------
 +
 +
If you want to run the mcp server, you can install `playwright-mcp` and then add it like this in `.mcp.json`
 +
 +
  {
 +
    "mcpServers": {
 +
      "playwright": {
 +
          "command": "mcp-server-playwright",
 +
          "args": ["--browser", "chromium"]
 +
        },
 +
    }
 +
  }

Latest revision as of 21:12, 15 October 2025

This might be outdated and maybe unnecessary. I tried to this but the versions of the browsers getting installed are way too old and not compatible with the browsers the node playwright version wants to install.

It is better to remove the `@playwright/*` from packages.json altogether and instead install the native packages `playwright-driver` and `playwright-test` from nixpkgs!

Then execute `playwright test` or whatever was/is configured as script in packages.json


If you want to run the mcp server, you can install `playwright-mcp` and then add it like this in `.mcp.json`

 {
   "mcpServers": {
      "playwright": {
         "command": "mcp-server-playwright",
         "args": ["--browser", "chromium"]
       },
    }
 }