Skip to content

Commit

Permalink
killing browser process directly
Browse files Browse the repository at this point in the history
  • Loading branch information
BatMiles committed Jul 23, 2024
1 parent 4222f3e commit 6193349
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ export const closeBrowser = async (browser) => {
await pages[i].close();
console.log('closed page');
}

const childProcess = browser.process()
if (childProcess) {
childProcess.kill(9)
}
console.log("before closing browser");
await browser.close();
console.log("after closing browser");
Expand Down

0 comments on commit 6193349

Please sign in to comment.