0
0
mirror of https://github.com/puppeteer/puppeteer synced 2024-06-14 14:02:48 +00:00
puppeteer/test/fixtures/dumpio.js
Yaniv Efraim 66887743ea fix(Launcher): fix dumpio bug ()
This patch fixes `dumpio` launcher option.

Fixes 
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();
})();