RUDOLF_BOTHMA
7 years agoCommunity Hero
Edit: Fixed the copy&paste error I made in the code
I experience the same as cunderw and I'm on 12.60 with ASP web pages. It hapens when I pop up a confirmation box and click OK. After it disappears, I have to wait X amount of seconds - usually very long - you don't want you tests falling over because it's the first time you get to a page and IIS still needs to compile etc. I solved it slightly differently using a function, but I agree that it appears to be an annoyance at the very least if not a bug. Not sure a feature requests though, since it would disable the object recognition in places you don't want. Code I use:
/// <summary> /// Method for clicking confirm buttons on screen when testcomplete doesn't pick up that they have been removed from the page /// so waits the full timeout period /// </summary> function ClickConfirmButton(ButtonAlias, overrideWaitInterval) { overrideWaitInterval = (overrideWaitInterval==null || overrideWaitInterval==undefined) ? 2000 : overrideWaitInterval; if(!ButtonAlias.WaitProperty("Exists",true,overrideWaitInterval)) //wait to see, but don't error in case the test can be recovered' { Log.Warning("Timeout Expired waiting for confim button [" + ButtonAlias.MappedName + "]","",pmNormal,"",Aliases.browser.page.PagePicture()); } var tempTimeout = Options.Run.Timeout; Options.Run.Timeout = 1000; ButtonAlias.Click(); Options.Run.Timeout = tempTimeout; }
Related Content
- 7 years ago
- 6 years ago