Hello,
I discovered a limitation where the browser tool does not allow setting a custom viewport size. The browser is launched with a fixed container viewport of 780x493 pixels, and there is no configuration option to change it.
This makes it impossible to take high-resolution screenshots (e.g. 1920x1080) using the integrated browser tool. The only option is to bypass the browser tool entirely and use chromium --headless --screenshot --window-size=1920,1080 directly from the command line, which defeats the purpose of having the browser tool for interactive browsing.
Steps to reproduce:
- Use the
browser_navigate tool to open a website
- Use the
browser_screenshot tool to capture a screenshot
- The resulting screenshot is only 780x493 pixels
What I tried:
browser_evaluate('window.resizeTo(1920, 1080)') — does not work in headless mode
- Checked for a cptr config file (e.g. ~/.cptr/config.yaml) — none exists
- No viewport_size parameter is exposed on any browser tool function
Thank you for your work, and I wish you all a great day,
Joshua Krimmer
Hello,
I discovered a limitation where the browser tool does not allow setting a custom viewport size. The browser is launched with a fixed container viewport of 780x493 pixels, and there is no configuration option to change it.
This makes it impossible to take high-resolution screenshots (e.g. 1920x1080) using the integrated browser tool. The only option is to bypass the browser tool entirely and use
chromium --headless --screenshot --window-size=1920,1080directly from the command line, which defeats the purpose of having the browser tool for interactive browsing.Steps to reproduce:
browser_navigatetool to open a websitebrowser_screenshottool to capture a screenshotWhat I tried:
browser_evaluate('window.resizeTo(1920, 1080)')— does not work in headless modeThank you for your work, and I wish you all a great day,
Joshua Krimmer