Skip to content

Commit

Permalink
adding logs
Browse files Browse the repository at this point in the history
  • Loading branch information
BatMiles committed Jul 23, 2024
1 parent 6193349 commit 566df4f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@ const deleteFolderRecursive = path => {
};

export const closeBrowser = async (browser) => {
console.log("closing browser");
console.log("closing browser 1");
console.log(browser);
const pages = await browser.pages();
console.log(`closing ${pages.length} pages`);
for (let i = 0; i < pages.length; i++) {
await pages[i].close();
console.log('closed page');
}
console.log("terminating child process");
const childProcess = browser.process()
if (childProcess) {
childProcess.kill(9)
Expand Down

0 comments on commit 566df4f

Please sign in to comment.