17 Replies
- WambooCommunity Hero
Hi,
In my opinion, you need to refresh mapping info
TestComplete caches mapped objects to speed up test runs. The first time a test uses an alias, TestComplete remembers the found object and uses the cached object for all subsequent uses of the alias.
- BenoitBCommunity Hero
And perhaps .. the test condition need != or ==, not a single = which is assignation .... 😄
- ChandanDContributor
Hello,
I have tested with == before raising to smartbear support. With this it doesn't wait for OK button to enable and the script gets finished in OK button disabled.
- ChandanDContributor
Hello,
Below is the code which I have written but still it is doing the same. Not coming out of while loop.
var inprogress = Aliases.TortoiseProc.dlgTrainingsvnCheckoutTortoiseSVN
var name = inprogress.WndCaption
while(name="Checkout Finished!")
{
inprogress.btnOK.Click()
name = inprogress.WndCaption
inprogress.RefreshMappingInfo()}
- BenoitBCommunity Hero
= is assign, so your condition will be ALWAYS true because you test that the assignation is done, which is always true...
Moreover, the name variable is useless.
Then avoid continuous click without delay between to let system act/react.
I'm not sure, you want to wait the text Checkout finished and then click a button OR you need to click a button till the text Checkout finished appears ?
This click on button until the text Checkout finished appears:
var inprogress = Aliases.TortoiseProc.dlgTrainingsvnCheckoutTortoiseSVN; while (inprogress.WndCaption != "Checkout Finished!" ) { inprogress.btnOK.Click(); inprogress.RefreshMappingInfo(); aqUtils.Delay(500); }
- rajulapatiContributor
Hi ChandanD ,
I would suggest you to use below code
var name = inprogress.WndCaption
while(name="Checkout Finished!"){
inprogress.btnOK.Click()
name = inprogress.WndCaption
}
You need to capture the Wndcaption again after you click OK button to make sure if the name of popup has changed or not.
-Ashwin
Please give a kudo and accept as a solution if it works
- ChandanDContributor
Hello,
No. it didn't worked.
It is still in while loop searching for WndCaption & Ok button.