cancel
Showing results for 
Search instead for 
Did you mean: 

Region fails after 1st attempt

xlxu001
Level 5
We are trying to use Surface Automation (Region) in order to click on an area of the screen in SAP that is not correctly identifiable in SAP mode, hence we need to click on this background table by using Region.  The issue we are having is the region seems to lose the properties after the 1st attempt.  The first step we are taking is activating the SAP screen, then finding the screen bounds, and then we are trying to get the entire image of the screen using a dynamic region with the screen width and height as parameters.  We need to do this in order to then find a smaller image with the Image Search Utility in order to click on that specific spot.  However, the dynamic regions works only the first time we define it in App Modeler and when we try to run it again the next day or with other data it fails.  The data in SAP will always change every time we go with a different queue item.  However, the label we need to click in will stay the same.  Any hints as to what could be happening?  Please see attached the properties of the region spied. PS: If that image is identified, the rest of the steps are working perfectly.
Lourdes Urena Sr Solutions Engineering Grainger Panama Services Panama
3 REPLIES 3

Denis__Dennehy
Level 15
Is font smoothing/cleartype turned off??  If it is not turned off images of text will be different every time.

xlxu001
Level 5
Hey Denis! It seemed the region wasn't finding the main window it pertained to.  We had to spy a lot of elements again, but it seems to be working consistently now.  Font smoothing is indeed turned off.
Lourdes Urena Sr Solutions Engineering Grainger Panama Services Panama

John__Carter
Staff
Staff
The thing to remember is that a region is the child of a Win32 element, and if that parent element can't be found (maybe because of a problem with the attribute selection) then the region will never be found. Also, if you need to just the parent element after the region has been created, then you need to make the same adjustments to the region element. Any adjustment to the parent will not be automatically transferred to the child.