@znode/find-chrome
v0.0.2
Published
Get Chrome Path for Puppeteer
Downloads
9
Maintainers
Readme
@zodash/find-chrome
TODO: description
Usage
import * as puppeteer from 'puppeteer';
import findChrome from '@zodash/find-chrome';
const browser = await puppeteer.launch({
args: ['--no-sandbox', '--disable-setuid-sandbox'],
executablePath: findChrome(),
});
const page = await browser.newPage();
await page.setUserAgent(
`Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36 Prerender`,
);
await page.setViewport({
width: 1920,
height: 1080,
});
await page.goto(url, {
waitUntil: 'networkidle0',
});