mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
fix(Launcher): use wait-for-process Firefox option (#6315)
This commit is contained in:
parent
996e82c7aa
commit
054d782c82
@ -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,
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user