cancel
Showing results for 
Search instead for 
Did you mean: 

Find image on screen - not working

ChrisRider
Level 4

I have an intermittent problem that occurs in my automation.  I loop through CSV data, fill in a form, etc.  Each time at the beginning of the loop, it is possible the Win32 application I am using will display an error dialog.  I have not figured out how to Spy the error or use application modeler.

What I am doing:

  1. At the beginning of the loop, I have an Action stage that captures the whole screen and saves it as a 1280x1024 bitmap.  If I view this file, I can see it has the error message.  (Of course, if there is no error, I still get the screen showing the Win32 application - but no error message.)
  2. I have also created data items of type image that have the error dialog and smaller images of the error dialog.  The error dialog as some text and an OK button.  The OK button has no shortcut keys available.  I am planning on using global send keys to type ALT-F4 to close the dialog if detected.

I'm not having luck finishing any of the images from my screenshot.  One screenshot is just the OK button from the error message.  At the time, no other OK buttons are visible.

I also have another screen shot that tries to find the entire error dialog within the screenshot.  

I have tried using Utility Image Manipulation->Get Sub Image.  It is not 

I have also tried Utility Image Search->Find Image.  It never finds anything unless I increase the tolerance to 7 or greater.  It then matches every screen (so it does not work.  It will match even when no error exists).

I have font smoothing disabled on the system.  Is there anything else I can do?  Or, perhaps there is a better way to detect this error.  

Sometimes the error occurs within a few minutes of running, other times it might not occur until 20-30 minutes later.  I think the Win32 application has performance problems causing the problem - but besides the error dialog, I do not know how to detect this issue.

2 REPLIES 2

ChrisRider
Level 4

I was able to get past the issue.  I used:  Utility Image Manipulation->Get Sub Image.  This works, but does take about 10 seconds.

I was not able to get the Utility Image Search->Find Image working - I suspect I am using it wrong and possibly not understanding its purpose.  

There is probably a better way to capture this error message.  I have not been able to use Application Modeler to spy it - the error is infrequent and I do not know what causes it. 

Hi Chris Rider,

Did you get chance to try  region mode in Application modeller?

-----------------------
If I answered your query. Please mark it as the Best Answer

Harish Mogulluri