summaryrefslogtreecommitdiff
path: root/snappy.js
diff options
context:
space:
mode:
authorrain <rain@puddle.local>2023-08-18 13:14:26 -0500
committerrain <rain@puddle.local>2023-08-18 13:14:26 -0500
commitb049a47d9fbc1444ec0bc0e48a5ee681206cbaf4 (patch)
tree5da661f93ef10aae2ce38b496a41fabc67ca31db /snappy.js
parentc5b9b8ac465b430361d253fe558ffb505b27e182 (diff)
Fixed issue with image verification paths as a result of changes to implement #1main
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`);
});