u
This commit is contained in:
@@ -270,7 +270,9 @@ export async function capturePage(debugPort, url, file, { width, height, settleM
|
||||
{ format: 'png', captureBeyondViewport: true, fromSurface: true },
|
||||
30000,
|
||||
);
|
||||
fs.writeFileSync(file, Buffer.from(data, 'base64'));
|
||||
const buf = Buffer.from(data, 'base64');
|
||||
if (file) fs.writeFileSync(file, buf);
|
||||
return buf;
|
||||
} finally {
|
||||
session.close();
|
||||
await fetch(`http://127.0.0.1:${debugPort}/json/close/${target.id}`).catch(() => {});
|
||||
|
||||
Reference in New Issue
Block a user