From 6193349074e6331a797e88587cce863896ba22d8 Mon Sep 17 00:00:00 2001 From: Miles Hilton Date: Tue, 23 Jul 2024 14:49:28 -0400 Subject: [PATCH] killing browser process directly --- src/utils.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils.ts b/src/utils.ts index 082c72b..f16e471 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -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");