Sporadic Namemapping Issues
Hello,
I have been having a namemapping issue with the last two tests that I have recorded. When I recorded them they were fine, but occasionally on playback it tells me that the object namemapping was not found. If I update it to match the similar object, or hit 'try again' it works but only for that run. The next time I play it usually fails(but not always). However, I am positive this is not a timing issue. I have 400 other tests that have been recorded almost identically, and none of them are having problems. To be sure, I added a 10 second delay after my application is launched. It passed for a day then failed again. I have checked and the object is mapped, the objects mapping does not ever change, and I have tried several different properties to identify it.
Any ideas?
Thank you!
Lauren
I've seen the same issue a lot on my system. It seems that, for some reason, TestComplete occasionally loses the ability to see into open applications for a short time. But it is usually able to get it back, if you do a couple of things. I've been able to solve it by using a combination of things. First, you can use the General Open Applications property, specifically the Method Invoke Timeout property.
I've also had success with the the WaitAliasChild method, and the Exists property, along with a RefreshMappingInfo call. It ends up looking like this:
var w = Aliases.mySoftware.myForm.WaitAliasChild("myControl", 10000);
if (!w.Exists) mySoftware.RefreshMappingInfo;
Good luck!