Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

images differences are captured correctly but robot test is passing even when there is a difference with tolerance set to zero #103

Closed
abdalhamidElnaggar opened this issue Mar 11, 2023 · 3 comments
Labels

Comments

@abdalhamidElnaggar
Copy link
Contributor

Describe the bug
robot test is passing even when there is difference between two images and tolerance is set to 0

To Reproduce
Steps to reproduce the behavior:
1-create new test to compare two images by compare images keyword or compare two images
2-make sure there is a difference between the two images
3-run the test and check robot result

Expected behavior
robot test should fail as there is a difference between the two images
Screenshots
If applicable, add screenshots to help explain your problem.
attached the two images and the diff one
Desktop (please complete the following information):

  • OS: MacOS venture 13.3
  • Browser : chrome
  • Version :110

Additional context
robot_test
home_ref
home_actual
home_diff

@abdalhamidElnaggar
Copy link
Contributor Author

it seems like magick is returning the difference as 0 , can this be an issue with magick ?

@jessezach
Copy link
Owner

jessezach commented Mar 12, 2023

@abdalhamidElnaggar I took a look at this. Magick returns a value of 0.002 which is a difference of 0.2%. This gets casted to int which is converting the difference to 0. I'll fix the code to retain the exact value instead of doing the int conversion.

Meanwhile a workaround for this could be to use capture element keyword and capture a portion of the page (headers for example). This should return a higher difference value for the mismatch and would result in a failure

@jessezach jessezach added the bug label Mar 12, 2023
@abdalhamidElnaggar
Copy link
Contributor Author

@jz-jess thank you .. i will wait for the fix as my plan is to compare full pages not just elements.
thanks again much appreciated.

abdalhamidElnaggar added a commit to abdalhamidElnaggar/RobotEyes that referenced this issue Mar 19, 2023
removed float trimming to fix issue jessezach#103 , I already tested this locally and it is working fine , it may not be the best solution but it works for now.thanks
jessezach pushed a commit that referenced this issue Mar 26, 2023
removed float trimming to fix issue #103
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants