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/
This commit is contained in:
Joel Einbinder 2020-01-21 17:22:48 -08:00 committed by Andrey Lushnikov
parent b8bb58e48b
commit 8127c890e4

View File

@ -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');