Forum Discussion

MulgraveTester's avatar
MulgraveTester
Frequent Contributor
12 years ago

Updating Region Images for Comparison

The code I am testing has a staus bar that I cannot interrogate other than its image. The status bar counts down from 100% to 0% and I need to wait for it to reach 0% before executing further tests.



I have used regions to capture the image of the status bar successfully.

I can wait for the object to reach 0% by using VB Script



statusIsZero = regions.gStatusBar.check(Aliases...StatusBarObject)



and keep looping until statusIsZero.



I need to run this test on different PCs with different operating systems using TestExecute. The image may change between systems due to OS or screen resolution. Prior to executing the test cycle I want to be able to capture the 0% image for that particular system.



I use a form to initiate my test and have a button to trigger the capture and update the region image.



I can't find a way to update the region image at execute time without disabling the ability to compare/check the image against other images.



If I set Engine|Stores|Update regions and also check the update region checkbox then I can update the region image with



call regions.gStatusBar.check(Aliases...StatusBarObject)



but then any comparisons ALWAYS update the region image and ALWAYS return TRUE for the comparison.



How do I update the image once at run time without losing the compare functionality?
No RepliesBe the first to reply