From 8127c890e434b1543bd86c6bd15f772e14f824e7 Mon Sep 17 00:00:00 2001 From: Joel Einbinder Date: Tue, 21 Jan 2020 17:22:48 -0800 Subject: [PATCH] fix(firefox): be able to launch on headful+windows (#553) Without the `-wait-for-browser` flag, the launcher process immediately exits on windows. Because we listen to 'exit', we think the browser has closed. We still can't close the Firefox process very well. For the reference, this is based upon https://wiki.mozilla.org/Platform/Integration/InjectEject/Launcher_Process/ --- src/server/ffPlaywright.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/server/ffPlaywright.ts b/src/server/ffPlaywright.ts index 044e1a03d1..4d5874cc6b 100644 --- a/src/server/ffPlaywright.ts +++ b/src/server/ffPlaywright.ts @@ -203,6 +203,8 @@ export class FFPlaywright implements Playwright { firefoxArguments.push('-profile', userDataDir); if (headless) firefoxArguments.push('-headless'); + else + firefoxArguments.push('-wait-for-browser'); firefoxArguments.push(...args); if (args.every(arg => arg.startsWith('-'))) firefoxArguments.push('about:blank');