Open semeguze opened 2 years ago
Hi @semeguze
Thanks for your suggestion. The problem with scaleToSameSize, and especially for mobile devices, is that it might still break. Those screenshots are very big and resizing might break due to the amount of pixels.
You can validate if it works here. If so then I'm happy to implement it. Some example images would also be great so I can do some digging
Thanks
π Is your feature request related to a problem? Please describe. I'm executing my tests on cloud servers, some of them are launching the tests with different resolutions that the ones I'm using on local executions.
Sometimes it is 1080p or 1440p, which is not configurable.
Because of that the image comparison is failing, as the resolution is different between the baseline image and the screenshot:
π Describe the solution you'd like I saw that
webdriver-image-comparison
project implements this optionscaleImagesToSameSize
under the Resemble 'scaleToSameSize` option: https://github.com/wswebcreation/webdriver-image-comparison/blob/main/docs/OPTIONS.md#scaleimagestosamesizeWould it be possible to also include it as part of this project or could you give me an idea on how to include it so I could add a new PR?
My idea, is something like:
π Describe alternatives you've considered I have considered the following alternatives:
await this.driver.getWindowSize();
values.However I want to avoid using the OpenCV and/or Jimp library if Resemble is already using the 'Scale to same size' functionality.
π Additional context I think that with a code like this I should be close to it working for me, however I couldn't get it to work
Thanks in advance!!