Jose Pita | "R. Gratis If you decide to write script functions to find the objects for you, you can always move them out into a Script Extensions Runtime Object, which can make them much like Aliases in TestComplete. I've done this on a few different products to allow sharing the functions between multiple TestComplete Projects."
Yesterday I was investigating this option but I found some forum entry saying that you can't debug \ catch errors from Script Extensions. Haven't tried it yet, but I don't think I'm willing to. |
I write in VBScript, so I use VBScript's native error handling mechanism to catch exceptions inside the Script Extension code. If an exception makes it through, it pops up an exception window during a TestComplete run. I can get the line number / unit in the Script Extension from the popup text, but that same information doesn't make it into the TestComplete log Call Stack, so if you're trying to fix an issue in an unattended test run that you can't replicate locally, it can be difficult. It certainly makes you write defensive code.