chore: use persistent profile by default (#41)
Fixes https://github.com/microsoft/playwright-mcp/issues/29
This commit is contained in:
parent
5345a7b4df
commit
6ff4500211
11 changed files with 122 additions and 69 deletions
|
|
@ -121,11 +121,12 @@ export const test = baseTest.extend<Fixtures>({
|
|||
await use(await startServer());
|
||||
},
|
||||
|
||||
startServer: async ({ }, use) => {
|
||||
startServer: async ({ }, use, testInfo) => {
|
||||
let server: MCPServer | undefined;
|
||||
const userDataDir = testInfo.outputPath('user-data-dir');
|
||||
|
||||
use(async options => {
|
||||
server = new MCPServer('node', [path.join(__dirname, '../cli.js'), '--headless'], options);
|
||||
server = new MCPServer('node', [path.join(__dirname, '../cli.js'), '--headless', '--user-data-dir', userDataDir], options);
|
||||
const initialize = await server.send({
|
||||
jsonrpc: '2.0',
|
||||
id: 0,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue