mirror of
https://github.com/microsoft/playwright-mcp.git
synced 2026-02-02 08:33:39 +00:00
fix: stitch all frames into one snapshot (#49)
This commit is contained in:
@@ -416,3 +416,37 @@ test('browser://console', async ({ server }) => {
|
||||
}),
|
||||
}));
|
||||
});
|
||||
|
||||
test('stitched aria frames', async ({ server }) => {
|
||||
const response = await server.send({
|
||||
jsonrpc: '2.0',
|
||||
id: 2,
|
||||
method: 'tools/call',
|
||||
params: {
|
||||
name: 'browser_navigate',
|
||||
arguments: {
|
||||
url: 'data:text/html,<h1>Hello</h1><iframe src="data:text/html,<h1>World</h1>"></iframe>',
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
expect(response).toEqual(expect.objectContaining({
|
||||
id: 2,
|
||||
result: {
|
||||
content: [{
|
||||
type: 'text',
|
||||
text: `
|
||||
- Page URL: data:text/html,<h1>Hello</h1><iframe src="data:text/html,<h1>World</h1>"></iframe>
|
||||
- Page Title:
|
||||
- Page Snapshot
|
||||
\`\`\`yaml
|
||||
- document [ref=s1e2]:
|
||||
- heading \"Hello\" [level=1] [ref=s1e4]
|
||||
- document [ref=f1s1e2]:
|
||||
- heading \"World\" [level=1] [ref=f1s1e4]
|
||||
\`\`\`
|
||||
`,
|
||||
}],
|
||||
},
|
||||
}));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user