summaryrefslogtreecommitdiff
path: root/snappy.js
diff options
context:
space:
mode:
Diffstat (limited to 'snappy.js')
-rwxr-xr-xsnappy.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/snappy.js b/snappy.js
index 96fd5a6..b561d8e 100755
--- a/snappy.js
+++ b/snappy.js
@@ -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`);
});