-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
p3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)
Description
Clear and concise description of the problem
Currently, when page.screenshot({ base64: true }), the file is still being created.
I want to delegate the file creation to another code similar to jest-image-snapshot.
https://vitest.dev/guide/browser/locators.html#screenshot
Suggested solution
IMO when doing { base64: true } it should not generate the file. It should even return Promise<Buffer> like how it is done in playwright.
If we want to avoid breaking change, we can add { skipFileCreation?: true } option.
Alternative
playwright does not create the file by default:
/**
* The file path to save the image to. The screenshot type will be inferred from file extension. If `path` is a
* relative path, then it is resolved relative to the current working directory. If no path is provided, the image
* won't be saved to the disk.
*/
path?: string;
No response
Additional context
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
p3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)
Type
Projects
Status
Approved