You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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;
IMO when doing { base64: true } it should not generate the file. It should even return Promise<Buffer> like how it is done in playwright.
There is no such thing as Buffer in the browser.
Currently, when page.screenshot({ base64: true }), the file is still being created
The API is universal - currently, webdriverio always creates a file. This is the main reason why it's the same across the board. I guess, technically we can have different behaviours between different providers.
Can webdriverio disable the file creation? playwright default is not creating a file. IMO that is a better approach/default as the behavior is more decoupled.
Currently, per documentation the path must be a relative path, which further limits the ability to fake it by saving it to a vinyl or temp folder.
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 returnPromise<Buffer>
like how it is done inplaywright
.If we want to avoid breaking change, we can add
{ skipFileCreation?: true }
option.Alternative
playwright
does not create the file by default:No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: