mirror of
https://github.com/microsoft/playwright-mcp.git
synced 2026-03-18 23:13:09 +00:00
chore: follow up on tab snapshot capture (#739)
This commit is contained in:
@@ -49,11 +49,11 @@ const evaluate = defineTabTool({
|
||||
response.addCode(`await page.evaluate(${javascript.quote(params.function)});`);
|
||||
}
|
||||
|
||||
await tab.run(async () => {
|
||||
await tab.waitForCompletion(async () => {
|
||||
const receiver = locator ?? tab.page as any;
|
||||
const result = await receiver._evaluateFunction(params.function);
|
||||
response.addResult(JSON.stringify(result, null, 2) || 'undefined');
|
||||
}, response);
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user