Forum Discussion

Geoff's avatar
Geoff
New Contributor
6 years ago

Tests still pass even when Image in Image based actions aren't on the screen (False positives)

Hi there,

I'm using some image based recognition in my Keyword tests due to the technology of parts of our GUI. I've added an Image Based action of 'Exists' for some of those images. Even if those images don't exist on the screen though (I've added a couple of dummy ones to test that this also fails correctly) the test attempts to find the image a couple of times, then moves to the next step - in the end the test  still passes with no errors, warnings or logs about the image recognitions steps.

 

In the doco I've seen, it mentions that the test should fail if the image itself cant be found. I've gone to the Image on the Image Set, and when I select Highlight on Screen I get 'Unable to Highlight on Screen' when the image isn't on the screen, and a successful highlight when it is, so the recognition through the set seems fine.

 

Have I missed a step on how to properly assert the Image Based actions steps and getting them to be validated as part of the keyword tests?

 

Any help on this would be great.

Thanks,

Geoff

 

 

4 Replies

  • shankar_r's avatar
    shankar_r
    Community Hero

    I got your problem, if you could provide screenshots/code of your scenario would be better to help you

    • Geoff's avatar
      Geoff
      New Contributor

      Thanks Shankar,

      I've attached the image below for the Image based action. I figured though, I might need to use a Region Checkpoint instead, however this is having the opposite problem. I cannot get any image to be recognised.

       

      When I add a region checkpoint I use the Select Window region option. I select the small region in the app, then I can select the 'Highlight' button in the wizzardand it will 'highlight' my image correctly in the application.

      When I go to run the test, it fails and the image comparrison just shows red. I've tried to turn of DWM, change the image type, I've turned off Aero desktop theme, changed the tolerance levels all to no effect. When I reselect the Region checkpoint to go back into the wizzard and re-highlight the area on the application, it can no longer find the image on the screen. (Returns an error). So, either way I'm stuck when trying to use some sort of image comparrison to asset some of the tests.

       

      Any help, direction or something else to try would be great as I'm going a bit cross-eyed here.