cancel
Showing results for 
Search instead for 
Did you mean: 

Can I add Delay until Region Checkpoint is true

SOLVED
Highlighted
Occasional Contributor

Can I add Delay until Region Checkpoint is true

Hi Team,

 

I am currently trying to automate desktop application using TC v14. 

Where in I am using region checkpoint to validate certain image to appear on one the control of the application. 

but application takes some time to populate that image in the control but as soon as I execute script then it does not wait until that image is populated on the application control.

 

Basically I want execution to delay until that image appears on the application control. and once it appears then comes out of the delay loop. 

 

do

{

    Delay (1000);

} while (region.check  appears on application control); 

 

can someone please suggest any wayout, where I can introduce delay for Region checkpoint to appear and then move ahead.

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Community Leader

Re: Can I add Delay until Region Checkpoint is true

Yo!

 

@tristaanogre is right.

 

Another solution is to use ImageRepository:

 

1) Create an image of this example "Test Executed: 01/10"

2) ImageRepository is a simple object so You can check it's Existing in if or while loop.

 

example:

 

do {
   Obj.Keys("[PageDown]");
} while(!ImageRepository.ImgeSetName.ImageName.Exists(Sys.Desktop));

View solution in original post

Highlighted
Occasional Contributor

Re: Can I add Delay until Region Checkpoint is true

Thank you so much @Wamboo for providing above peice of code. it helped and now able to wait until the image appears on the desktop. 

 

Thanks @tristaanogre for your inputs as well. I contacted support to see if we can also get IQ in our license. 

Cheers !! 

View solution in original post

7 REPLIES 7
Highlighted
Community Hero

Re: Can I add Delay until Region Checkpoint is true

I would examine the control in object spy or object browser and look to see if there is a property on the control that gives an indication of the image.  I'm assuming that, when the image is not populated, that property will be blank or something.  If that's the case, I'd use a "WaitProperty" method call to wait for the property to be populated before doing the region check.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
Highlighted
Occasional Contributor

Re: Can I add Delay until Region Checkpoint is true

Thank you @tristaanogre  for response. 

 

But I cannot spy on the object because its a limitation of TC where it cannot identify or travense on webview object.

 

and this is the reason I am using region checkpoint to see of the desired object/value appeared on the control and once appeared, then move ahead. 

 

Basically steps are : 

1. there are say 10 tests (which are appearing as a checkbox list on the control)

2. I select all 10 checkboxes on the control and click on Run button.

3. Now what I want is - until  "Test Executed: 10/10"  appears on the panel, I want to delay the execution. 

it increments count by one like - "Test Executed: 01/10"   then  next is "Test Executed: 02/10" ........ 

 

as soon as panel shows image like - "Test Executed: 10/10"  End delay and move ahead with next test steps. 

 

 

Highlighted
Community Hero

Re: Can I add Delay until Region Checkpoint is true

That sounds less like regional checks and more like OCR.  Have you looked at using the Text Recognition feature?

 

https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/text-recognition/...


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
Highlighted
Occasional Contributor

Re: Can I add Delay until Region Checkpoint is true

Yes I was looking at this feature in the morning but then realized the the OCR is not activated in our license. 

it seems OCR is available for standalon license only ? 

 

or for floating also this feature is enabled ? 

 

 

Highlighted
Community Hero

Re: Can I add Delay until Region Checkpoint is true

Text Recognition is not something that is licensed.  You can use this feature without an extra license.

 

https://support.smartbear.com/testcomplete/docs/working-with/managing-projects/properties/open-apps/...

 


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
Highlighted
Community Leader

Re: Can I add Delay until Region Checkpoint is true

Yo!

 

@tristaanogre is right.

 

Another solution is to use ImageRepository:

 

1) Create an image of this example "Test Executed: 01/10"

2) ImageRepository is a simple object so You can check it's Existing in if or while loop.

 

example:

 

do {
   Obj.Keys("[PageDown]");
} while(!ImageRepository.ImgeSetName.ImageName.Exists(Sys.Desktop));

View solution in original post

Highlighted
Occasional Contributor

Re: Can I add Delay until Region Checkpoint is true

Thank you so much @Wamboo for providing above peice of code. it helped and now able to wait until the image appears on the desktop. 

 

Thanks @tristaanogre for your inputs as well. I contacted support to see if we can also get IQ in our license. 

Cheers !! 

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors