merusso
15 years agoNew Contributor
Why don't TestComplete's Test Objects/Methods/Parameters Throw Exceptions?
Sorry if I'm in the wrong place. I'm currently evaluating TestComplete as a possible replacement of our current test automation tool, and I'm trying to see if it either contains similar behavior to our current tool or if it can offer similar testing with alternative methods.
The thing I'm stuck on right now is that TestComplete can use a more modern object-oriented scripting language (compared to proprietary languages or VBScript) with support for exception handling, but for some reason, TestComplete's methods don't throw exceptions.
Without this capability, I can't see how exceptions can propagate up the call stack.
For example, FunctionA() calls FunctionB(), which tries to click on an object that it can't find. If "try catch" is set up in FunctionA(), it will know if standard JScript exceptions occur in FunctionB(), but it cannot know if errors result from TestComplete methods. It seems like the only options are to halt the test (useless to me), break the call chain and always execute FunctionC(), or continue execution.
I want to be able to detect when these errors occur and throw them. Is there any way to do this?
The thing I'm stuck on right now is that TestComplete can use a more modern object-oriented scripting language (compared to proprietary languages or VBScript) with support for exception handling, but for some reason, TestComplete's methods don't throw exceptions.
Without this capability, I can't see how exceptions can propagate up the call stack.
For example, FunctionA() calls FunctionB(), which tries to click on an object that it can't find. If "try catch" is set up in FunctionA(), it will know if standard JScript exceptions occur in FunctionB(), but it cannot know if errors result from TestComplete methods. It seems like the only options are to halt the test (useless to me), break the call chain and always execute FunctionC(), or continue execution.
I want to be able to detect when these errors occur and throw them. Is there any way to do this?