Hey guys,
I’ve been trying to implement the Resemble helper but it doesn’t work correctly for me. At the end of the test the browser should close and the console should display the tolerance level and mismatch percentage. Then, a diff image should be saved in the specified diff folder.
Instead, only the tolerance level is printed in console and it does not save a diff image and also the browser remains open. It does take the screenshot though and save it in the ‘output’ folder. I tried updating webdriver to v5 as specified and followed the setup docs word for word. When debugging resemble.js and index.js i have found that the compare functions are not being executed for some reason. Please help me troubleshoot this, i’ve been trying for 3 days
So I think the problem is, you don’t have the image present in the base folder since you are running the test for the first time, you should make sure you have an image in the base folder.
let me explain, For image comparison to work, codecept must find a base image in the baseFolder and a screenshot image in the output folder, it will use these two images to make a comparison and produce a diff image in the diff folder.
Try running the same test using the following last line:
If you notice here, I update prepareBaseImage option to true, this will move the image present in the screenshot folder to baseFolder and then you must write a new scenario to make a comparison.
I too was struggling with resemblejs. And only thing that helped is counter-intuitive: although you are using the codecept.conf.js instead of JSON you should config Resemble in JSON format:
Hello, is there a certain configuration for resemble helper which will continue the test even if it detects a visual change? This is the problem that I am having:
In one of my scenarios (I am using codeceptjs with webdriver), I have a for loop which loops through the pages of a pdf file opened in the browser and takes snapshots of each page. Right now, whenever a change is detected say on page 2, my test exits. I want it to continue looping through the other pages of the pdf file and mark the failed issues after the for loop is done. Is there a way to achieve this please?
I was thinking maybe there is a configuration which I can add in the helper.
This is my conf:
“ResembleHelper” : {
“require”: “codeceptjs-resemblehelper”,
“screenshotFolder” : “C:/ResembleScreenshots/output/”,
“baseFolder”: “C:/ResembleScreenshots/base/”,
“diffFolder”: “C:/ResembleScreenshots/diff/”
},
HI Puneet,
Can you help me for using resemble ,i want to compare two image.
Below is my codecept configuration:
ResembleHelper : {
require: “codeceptjs-resemblehelper”,
screenshotFolder : “./testresult/screenshot/”,
baseFolder: “./testresult/base/”,
diffFolder: “./testresult/diff/”
}
},
package.json:
“devDependencies”: {