adding flag to chrome

This commit is contained in:
tambien 2018-08-26 20:02:58 -04:00
parent 79ec298dc3
commit a908f8ef88

View file

@ -4,7 +4,7 @@ const fs = require("fs");
function runPage(path){
return new Promise(async (done, error) => {
const browser = await puppeteer.launch();
const browser = await puppeteer.launch({ args : ["--no-sandbox"] });
const page = await browser.newPage();
page.on("pageerror", e => error(e));
await page.goto(`file://${path}`, { waitFor : "networkidle0" });