Open unional opened 3 weeks ago
IMO when doing
{ base64: true }
it should not generate the file. It should even returnPromise<Buffer>
like how it is done inplaywright
.
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.
currently, webdriverio always creates a file
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.
Can webdriverio disable the file creation?
You are quoting the answer to your own question. It cannot. (At least, to my knowledge)
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