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
|
|
@ -72,7 +72,7 @@ async function waitForCompletion<R>(page: playwright.Page, callback: () => Promi
|
|||
}
|
||||
|
||||
export async function runAndWait(context: Context, status: string, callback: (page: playwright.Page) => Promise<any>, snapshot: boolean = false): Promise<ToolResult> {
|
||||
const page = await context.ensurePage();
|
||||
const page = await context.existingPage();
|
||||
await waitForCompletion(page, () => callback(page));
|
||||
return snapshot ? captureAriaSnapshot(page, status) : {
|
||||
content: [{ type: 'text', text: status }],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue