How to return success if the comparison of 2 images fails
Posted: Thu Apr 30, 2015 3:09 pm
Hello,
I use Ranorex for only a few time and for the need of automation tests, I want return success in case two images are different (one is in the repository, the other is a screenshot of the current screen). The aim of this is to know if elements have moved (and they should have move).
I tried this code :
Thanks a lot
Sorry for my bad english, it's far to be my mother's tongue
I use Ranorex for only a few time and for the need of automation tests, I want return success in case two images are different (one is in the repository, the other is a screenshot of the current screen). The aim of this is to know if elements have moved (and they should have move).
I tried this code :
try { Validate.CompareImage(info, screenshot,option) //with relevant data here } catch (RanorexException e) { Report.Success("Hourra!"); }The problem is that I have both results : the test fails because of the difference between the two images despite the "try" but the text for success is here too!
Thanks a lot
Sorry for my bad english, it's far to be my mother's tongue