At the moment webdriver-image-comparison saves images and perform image comparison as is, not taking into account dpr of devices screenshots were taken from. As a result, when running tests on devices with different dpr compared to ones baseline screenshot was taken from, you often get false negative. I.e. images taken from macbook with retina display compared to image taken from regular display produce following result: (mismatch percentage is 77%)
Current PR tries to address this issue via functionality of resemble.js scaleToSameSize
In order to enable such functionality one needs to add flag scaleToSameSize : true either to plugin configuration or directly the the method of comparing images, e.g. compareElements
Comparison result after applying rescaling: (mismatch percentage is 2%)
At the moment webdriver-image-comparison saves images and perform image comparison as is, not taking into account dpr of devices screenshots were taken from. As a result, when running tests on devices with different dpr compared to ones baseline screenshot was taken from, you often get false negative. I.e. images taken from macbook with retina display compared to image taken from regular display produce following result: (mismatch percentage is 77%)
Current PR tries to address this issue via functionality of resemble.js scaleToSameSize In order to enable such functionality one needs to add flag
scaleToSameSize : true
either to plugin configuration or directly the the method of comparing images, e.g.compareElements
Comparison result after applying rescaling: (mismatch percentage is 2%)