sheetjs_sheetjs/packages/s/misc/puppetmjs.js

15 lines
548 B
JavaScript
Raw Permalink Normal View History

2019-09-04 06:26:56 +00:00
const puppeteer = require("puppeteer");
const path = require("path");
const target = "http://localhost:7262/misc/module.html";
(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.waitFor(1000);
console.log("page");
page.on('console', msg => console.log('PAGE LOG:', msg.text()));
page.on('error', (err) => { console.error(err); process.exit(1); });
page.on('pageerror', (err) => { console.error(err); process.exit(2); });
await page.goto(target);
await browser.close();
})();