mirror of
https://github.com/microsoft/playwright-mcp.git
synced 2025-07-26 08:32:26 +08:00
chore: document user-data-dir
This commit is contained in:
parent
7a87e160ad
commit
3ca4c9851d
12
README.md
12
README.md
@ -59,6 +59,18 @@ code-insiders --add-mcp '{"name":"playwright","command":"npx","args":["@playwrig
|
||||
|
||||
After installation, the Playwright MCP server will be available for use with your GitHub Copilot agent in VS Code.
|
||||
|
||||
### User data directory
|
||||
|
||||
Playwright MCP will launch Chrome browser with the new profile, located at
|
||||
|
||||
```
|
||||
- `%USERPROFILE%\AppData\Local\ms-playwright\mcp-chrome-profile` on Windows
|
||||
- `~/Library/Caches/ms-playwright/mcp-chrome-profile` on macOS
|
||||
- `~/.cache/ms-playwright/mcp-chrome-profile` on Linux
|
||||
```
|
||||
|
||||
All the logged in information will be stored in that profile, you can delete it between sessions if you'dlike to clear the offline state.
|
||||
|
||||
|
||||
### Running headless browser (Browser without GUI).
|
||||
|
||||
|
@ -69,7 +69,7 @@ async function userDataDir() {
|
||||
cacheDirectory = process.env.LOCALAPPDATA || path.join(os.homedir(), 'AppData', 'Local');
|
||||
else
|
||||
throw new Error('Unsupported platform: ' + process.platform);
|
||||
const result = path.join(cacheDirectory, 'ms-playwright', 'mcp-chromium-profile');
|
||||
const result = path.join(cacheDirectory, 'ms-playwright', 'mcp-chrome-profile');
|
||||
await fs.promises.mkdir(result, { recursive: true });
|
||||
return result;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user