chore: use pngs by default for screenshots (#797)

1. Use PNG by default.
1. Increase JPG quality from `50` -> `90`.
This commit is contained in:
Max Schmitt
2025-07-31 11:03:19 +02:00
committed by GitHub
parent 6dd44923da
commit 2a86ac74e3
3 changed files with 60 additions and 24 deletions

View File

@@ -544,7 +544,7 @@ http.createServer(async (req, res) => {
- Title: Take a screenshot
- Description: Take a screenshot of the current page. You can't perform actions based on the screenshot, use browser_snapshot for actions.
- Parameters:
- `raw` (boolean, optional): Whether to return without compression (in PNG format). Default is false, which returns a JPEG image.
- `type` (string, optional): Image format for the screenshot. Default is png.
- `filename` (string, optional): File name to save the screenshot to. Defaults to `page-{timestamp}.{png|jpeg}` if not specified.
- `element` (string, optional): Human-readable element description used to obtain permission to screenshot the element. If not provided, the screenshot will be taken of viewport. If element is provided, ref must be provided too.
- `ref` (string, optional): Exact target element reference from the page snapshot. If not provided, the screenshot will be taken of viewport. If ref is provided, element must be provided too.