This commit is contained in:
Labhansh Agrawal 2024-03-20 18:20:13 +05:30
parent 0ed964b211
commit 392fee843e

View file

@ -38,11 +38,10 @@ test.before(async () => {
test.after(async () => { test.after(async () => {
await app await app
.evaluate( .evaluate(({BrowserWindow}) =>
({BrowserWindow}) => BrowserWindow.getFocusedWindow()
BrowserWindow.getFocusedWindow() ?.capturePage()
?.capturePage() .then((img) => img.toPNG().toString('base64'))
.then((img) => img.toPNG().toString('base64'))
) )
.then((img) => Buffer.from(img || '', 'base64')) .then((img) => Buffer.from(img || '', 'base64'))
.then(async (imageBuffer) => { .then(async (imageBuffer) => {