diff options
Diffstat (limited to 'snappy.js')
-rwxr-xr-x | snappy.js | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -139,16 +139,17 @@ async function run() { for(var i = 0;i<sites.length;i++){ let site = validateUrl(sites[i]); let imageName = urlToFilename(site); + let fullImagePath = argv.o + imageName //await page.goto(site, { waitUntil: 'domcontentloaded' }); //await timeout(5000); //This can be used to REALLY slow down and wait for pages to load await page.goto(site, { waitUntil: 'networkidle2' }).then(async () => { let userTimeout = parseInt(argv.t); await timeout(isNaN(userTimeout)?0:userTimeout*1000); - await page.screenshot({path: argv.o + imageName}).then(async () => { + await page.screenshot({path: fullImagePath}).then(async () => { if(!argv.v) return; - const res = await verifyImage(imageName); + const res = await verifyImage(fullImagePath); if(res) fs.appendFileSync(argv.v, `${site}\n`); }); |