Update script.js

This commit is contained in:
Dan Harrin
2023-02-16 12:56:09 +00:00
parent a47c0d4b7c
commit 2fcc8e82fb
+1 -1
View File
@@ -12,7 +12,7 @@ for (const [file, options] of Object.entries(schema)) {
(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto(`http://localhost/${options.url}`, { waitUntil: 'networkidle2' });
await page.goto(`http://localhost:8000/${options.url}`, { waitUntil: 'networkidle2' });
const element = await page.waitForSelector(options.selector);
await element.screenshot({ path: `images/${file}.jpg` })