Forum Discussion
10 Replies
Hi Abhishek,
It's expected. The code you are using executes the test without a delay if the object exists or waits for the specified time (the Auto-wait timeout project option handles this) for it to appear.
You need to use the WaitAliasChild method to obtain the Aliases.eCC.dlg3900 object:
if Aliases.eCC.WaitAliasChild("dlg3900", 3000).Exists then
statement 1
statement 2
end if- abhishekcOccasional ContributorHello smartbear tem,
Please help asap as my trial is going to expire !!! - lphilippe_macauContributorCan you post an example of your code, so we can see what you are doing?
- NiranContributorHi Abhishek,
You want to reduce wait time for your every checkpoint but i think its not possible to reduce becoz checkpoint wait times are default. If your objects are identified it can move to next step else it should wait some time (default time) and get result.
Thanks.
Hi Niranjan,
As far as I know, there is no special timeout for checkpoints. So, let's try to figure out what is going on. How long is TestComplete executing the checkpoint operation? Does the checkpoint fail or pass - what information do you see in the log?
As for the trial expiration, the TestComplete Support team can prolong it.
- abhishekcOccasional ContributorHi louis,
Here is an bit of script as an example-
If Regions.frmShowMessages1.Check(Regions.CreateRegionInfo(Aliases.eCC.frmShowMessages, 160, 41, 523, 54, true)) Or Regions.frmShowMessages2.Check(Regions.CreateRegionInfo(Aliases.eCC.frmShowMessages, 158, 37, 527, 57, true)) then
'some code'
end if
So here is two checkpoints so test complete checks for one and if it does't found immediatly then wait for next checkpoint and waits some more if it does not found immediatly.So it tooks too much time for executing.Even when i know that object comes immediatly so there is no reason to wait for it.
Hi Abhishek,
I suppose the CreateRegionInfo method slows down the comparison procedure. Let me quote the "CreateRegionInfo Method" article:
If a region checkpoint compares a baseline image with the tested object’s rectangular area specified by the RegionInfo object, it performs comparison until the actual rectangular area matches the baseline image or until the timeout period specified by the Auto-wait timeout setting elapses. If a region checkpoint compares a baseline image with the Picture object, it returns the comparison results immediately.
So, using the Picture method that returns the Pricture object may help you speed up the test execution. For example:
- abhishekcOccasional ContributorOk
But what about this-
if Aliases.eCC.dlg3900.Exists=true then
statement 1
statement 2
end if
When the object Aliases.eCC.dlg3900 is being found script runs properly. but in most of the cases this object will not found so for that cases it waits for 10 sec(i.e. default wait time).So my concern is can i reduce the time so that if object is not being find then testcomplete will just wait for 1 sec or less instead of 10 sec.
Thanks in advance. - abhishekcOccasional ContributorThanks tanya,
It's working
Now my script can execute in lesser time. - alinderContributorI follow Tanya's recommendation of WaitAliasChild in my tests.
Also, if you have reasonable confidence you don't actually need to wait on the software under test to catch up, you can reduce WaitTime to much lower values - I use 50 ms when I am performing actions unrelated to changes in the object tree.