Reputation: 35
I have a question about TestComplete. My automated tests jump sometimes into a different window in the tested application and they become stuck there. This is caused by unknown controls for the specified test (it is searching for f.e. combobox which doesn't exists on the window). I was wandering if there is some way to avoid this situation and just skip to another test? The problem is that TC stays in endless loop of searching for the not existing object.
Thanks in advance for your responses. Josef
Upvotes: 0
Views: 908
Reputation: 3918
You need to organize your tests with test items. In this case, you will be able to specify the Test Item value for your test items' Stop on error property and TestComplete will start executing the next test if an error occurs during execution of the current test. You can find more information on this in the Tests and Test Items and Stopping Tests on Errors and Exceptions help topics.
Upvotes: 1
Reputation: 701
It does not jump there alone, does it? Be sure to have the right buttons pressed. If 2 windows are similar and in one window there is the ComboBox you want to test and in the other window not then I would go for something like this:
if(Aliases.GenericWindow.WaitAliasChild("ComboBoxInQuestion", customTimeoutInMilliseconds).Exists)
Log.Message("Do something with ComboBox");
The timeout can be set in the WaitAliasChild function. This waits customTimeoutInMilliseconds and if there is no ComboBox found it just skips the tests that were made for the ComboBox.
Upvotes: 0