puppeteer/test/fixtures/dumpio.js
Yaniv Efraim 66887743ea fix(Launcher): fix dumpio bug (#2071)
This patch fixes `dumpio` launcher option.

Fixes #2046
2018-02-22 19:06:13 -08:00

10 lines
385 B
JavaScript

(async() => {
const [, , puppeteerRoot, options, emptyPage, dumpioTextToLog] = process.argv;
const browser = await require(puppeteerRoot).launch(JSON.parse(options));
const page = await browser.newPage();
await page.goto(emptyPage);
await page.evaluate(_dumpioTextToLog => console.log(_dumpioTextToLog), dumpioTextToLog);
await page.close();
await browser.close();
})();