-
Notifications
You must be signed in to change notification settings - Fork 5
Comparison Results
Philipp Stracker edited this page Aug 12, 2021
·
5 revisions
Both methods checkVisualDifferences()
and getVisualDifferences()
return a Promise that resolves to the following "comparison results" object:
(boolean) - Whether the differences are within the allowed tolerance level.
(string) - Filename of the diff-file.
(int) - Absolute count of different pixels.
(int) - Absolute count of all pixels inside the image.
(int) - Absolute count of pixels, that are not ignored and inside the bounds-area.
(float) - Relative difference between both images. The percentage is calculated from the diffPixels
and relevantPixels
values.
const res = await I.getVisualDifferences("dashboard");
console.log('Match: ', res.match);
console.log('Diff-Image: ', res.diffImage);
console.log('Diff Pixels: ', res.diffPixels);
console.log('Total Pixels: ', res.totalPixels);
console.log('Relevant Pixels: ', res.relevantPixels);
console.log('Difference: ', res.difference);
Manual
Methods
Data Structures
Appendix
Development