diff --git a/tests/e2e/wdio.electrobun.conf.js b/tests/e2e/wdio.electrobun.conf.js index 73e5b29..bccc054 100644 --- a/tests/e2e/wdio.electrobun.conf.js +++ b/tests/e2e/wdio.electrobun.conf.js @@ -77,6 +77,9 @@ export const config = { } if (!electrobunBinary) { + // Kill any stale process on CDP port before launching + try { execSync(`fuser -k ${CDP_PORT}/tcp 2>/dev/null || true`); } catch {} + // Fall back to `electrobun dev` which builds + launches in one step console.log('[electrobun-cdp] No binary found, launching via electrobun dev...'); appProcess = spawn('npx', ['electrobun', 'dev'], {