diff --git a/src/utils.ts b/src/utils.ts index 3ab1865..87ca6cc 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -30,10 +30,14 @@ const deleteFolderRecursive = path => { export const closeBrowser = async (browser) => { console.log("closing browser"); const pages = await browser.pages(); + console.log(`closing ${pages.count} pages`); for (let i = 0; i < pages.length; i++) { await pages[i].close(); + console.log('closed page'); } + console.log("before closing browser"); await browser.close(); + console.log("after closing browser"); }; export const clearDir = (outDir, mkNewDir = true) => {