mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
10 lines
385 B
JavaScript
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();
|
||
|
})();
|