Disable automatic posting to log - default TC errors
I need to disable TestComplete errors logging or make it 'smarter'.
Case 1.
In some cases I need to perform different steps that depends on whether an object exists or not.
Let's say, the flow is:
1. Click button1
2. If button2.Exists:
button2.click()
else:
pass
3. Click button3
I expect that for some users button2 should not exist. For some users it should. And that is fine. But I get an error to my log if the button does not exist.
Case 2.
WaitNNN methods did not work for me so I implemented a while loop that checks if a view is shown.
wait_time = 2 while Sys.Process("app").Find('AutomationId', '123', 100, True).Visible: if wait_time > 6: Log.Error('123 screen is displayed for too long') break else: wait(wait_time) wait_time += 2
On the final check, when my screen has gone, I get an error to the log that expected screen not found. But that is fine! I am waiting for the screen to go.
So the question is - is it possible to disable TestComplete posting errors the the log. They do not provide me with expected information, but make all my test results RED due to these intermediate 'errors' while the tests pass.
I want only my custom errors and messaged to get to the log.