chore: only reset network log upon explicit navigation (#377)
Fixes https://github.com/microsoft/playwright-mcp/issues/376
This commit is contained in:
@@ -16,11 +16,21 @@
|
||||
|
||||
import { test, expect } from './fixtures.js';
|
||||
|
||||
test('browser_console_messages', async ({ client }) => {
|
||||
test('browser_console_messages', async ({ client, server }) => {
|
||||
server.setContent('/', `
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<script>
|
||||
console.log("Hello, world!");
|
||||
console.error("Error");
|
||||
</script>
|
||||
</html>
|
||||
`, 'text/html');
|
||||
|
||||
await client.callTool({
|
||||
name: 'browser_navigate',
|
||||
arguments: {
|
||||
url: 'data:text/html,<html><script>console.log("Hello, world!");console.error("Error"); </script></html>',
|
||||
url: server.PREFIX,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user