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.
Solved! Go to Solution.
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));
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 !!
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.
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.
That sounds less like regional checks and more like OCR. Have you looked at using the Text Recognition feature?
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 ?
Text Recognition is not something that is licensed. You can use this feature without an extra license.
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));
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 !!
Subject | Author | Latest Post |
---|---|---|