chore: allow taking pixel screenshots in snapshot mode (#44)
Ref: https://github.com/microsoft/playwright-mcp/issues/39
This commit is contained in:
parent
702fa0bdf3
commit
d4bc2c78d2
8 changed files with 37 additions and 6 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.existingPage();
|
||||
const page = 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