diff --git a/src/node/Launcher.ts b/src/node/Launcher.ts index 1e0812e07773b..d352a02098104 100644 --- a/src/node/Launcher.ts +++ b/src/node/Launcher.ts @@ -467,6 +467,9 @@ class FirefoxLauncher implements ProductLauncher { defaultArgs(options: ChromeArgOptions = {}): string[] { const firefoxArguments = ['--no-remote', '--foreground']; + if (os.platform().startsWith('win')) { + firefoxArguments.push('--wait-for-browser'); + } const { devtools = false, headless = !devtools, diff --git a/test/launcher.spec.ts b/test/launcher.spec.ts index ef3cef9cb9c92..d2ced501455d4 100644 --- a/test/launcher.spec.ts +++ b/test/launcher.spec.ts @@ -34,9 +34,10 @@ const mkdtempAsync = promisify(fs.mkdtemp); const readFileAsync = promisify(fs.readFile); const statAsync = promisify(fs.stat); const TMP_FOLDER = path.join(os.tmpdir(), 'pptr_tmp_folder-'); +const FIREFOX_TIMEOUT = 30 * 1000; describe('Launcher specs', function () { - if (getTestState().isFirefox) this.timeout(30 * 1000); + if (getTestState().isFirefox) this.timeout(FIREFOX_TIMEOUT); describe('Puppeteer', function () { describe('BrowserFetcher', function () { @@ -477,9 +478,10 @@ describe('Launcher specs', function () { * properly with help from the Mozilla folks. */ itFailsWindowsUntilDate( - new Date('2020-07-30'), + new Date('2020-08-30'), 'should be able to launch Firefox', - async () => { + async function () { + this.timeout(FIREFOX_TIMEOUT); const { puppeteer } = getTestState(); const browser = await puppeteer.launch({ product: 'firefox' }); const userAgent = await browser.userAgent();