Closed elgalu closed 10 years ago
this sounds like a cool enhancement @elgalu!
the "architecture" (to call it so ;) ) of the current implementation would need some refactoring to register multiple handlers after a screenshot was taken. maybe even the current meta data generation could be implemented using such a handler.
i'll add your suggestion as a possible future feature. maybe you have some spare time to invest? personally, i'm quite busy at the moment.
I'm glad you liked the idea, for now i realized that the following conditional satisfy my requirement for most cases:
if (lastBase64png !== currentPng) {
lastBase64png = currentPng; // store a reference to last saved png
util.storeScreenShot(currentPng, screenShotPath);
screenShotFile = baseName + '.png';
} else {
screenShotFile = 'screen shot skipped because equals last one.';
}
So maybe Resemble.js is overkill, feel free to close this issue!
cool you solved your requirement.
i'm gonna keep these thoughts in mind... maybe i can improve the reporters code anyway to make it more flexible in future.
Thanks for the screen shot reporter @swissmanu is very handy :)
My tests runs are big and generate 100's of png MB per day!
I was thinking about integrating http://huddle.github.io/Resemble.js/ to avoid saving the same image twice by using the server-side fork of resemble.js
What do you think about this feature? We may need to wrap the onComplete callback in a webdriver promise to make the scheduler wait for it before moving on.