feat: browser_resize (#92)
This commit is contained in:
parent
77080e8ca4
commit
e729494bd9
4 changed files with 52 additions and 4 deletions
|
|
@ -233,3 +233,22 @@ test('browser_type (slowly)', async ({ client }) => {
|
|||
].join('\n'),
|
||||
}]);
|
||||
});
|
||||
|
||||
test('browser_resize', async ({ client }) => {
|
||||
await client.callTool({
|
||||
name: 'browser_navigate',
|
||||
arguments: {
|
||||
url: 'data:text/html,<html><title>Resize Test</title><body><div id="size">Waiting for resize...</div><script>new ResizeObserver(() => { document.getElementById("size").textContent = `Window size: ${window.innerWidth}x${window.innerHeight}`; }).observe(document.body);</script></body></html>',
|
||||
},
|
||||
});
|
||||
|
||||
const response = await client.callTool({
|
||||
name: 'browser_resize',
|
||||
arguments: {
|
||||
width: 390,
|
||||
height: 780,
|
||||
},
|
||||
});
|
||||
expect(response).toContainTextContent('Resized browser window');
|
||||
expect(response).toContainTextContent('Window size: 390x780');
|
||||
});
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ test('test snapshot tool list', async ({ client }) => {
|
|||
'browser_navigate',
|
||||
'browser_pdf_save',
|
||||
'browser_press_key',
|
||||
'browser_resize',
|
||||
'browser_snapshot',
|
||||
'browser_tab_close',
|
||||
'browser_tab_list',
|
||||
|
|
@ -53,6 +54,7 @@ test('test vision tool list', async ({ visionClient }) => {
|
|||
'browser_navigate',
|
||||
'browser_pdf_save',
|
||||
'browser_press_key',
|
||||
'browser_resize',
|
||||
'browser_screen_capture',
|
||||
'browser_screen_click',
|
||||
'browser_screen_drag',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue