mirror of
https://github.com/microsoft/playwright-mcp.git
synced 2025-10-12 00:25:14 +03:00
Fix misleading browser_close message by adding resultOverride
Co-authored-by: Skn0tt <14912729+Skn0tt@users.noreply.github.com>
This commit is contained in:
@@ -34,6 +34,12 @@ const close = defineTool({
|
||||
code: [`await page.close()`],
|
||||
captureSnapshot: false,
|
||||
waitForNetwork: false,
|
||||
resultOverride: {
|
||||
content: [{
|
||||
type: 'text',
|
||||
text: 'Browser closed successfully.',
|
||||
}],
|
||||
},
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
@@ -29,7 +29,7 @@ test('test reopen browser', async ({ startClient, server, mcpMode }) => {
|
||||
|
||||
expect(await client.callTool({
|
||||
name: 'browser_close',
|
||||
})).toContainTextContent('No open pages available');
|
||||
})).toContainTextContent('Browser closed successfully.');
|
||||
|
||||
expect(await client.callTool({
|
||||
name: 'browser_navigate',
|
||||
|
||||
Reference in New Issue
Block a user