Forum Discussion
AlexKaras
Champion Level 1
14 years agoHi Joachim,
> Is there any possibility to change the error-level of failed checkpoints via jscript to warning?
Yes, you should be able to do this using the approach I mentioned earlier when replying to Robert.
Something like that (untested VBScript mockup):
OnLogErrorHandler:
...
' to prevent posting the default TestComplete messages to the Log
LogParams.Locked = True
Log.Enabled = False
If (<WarningShouldBePosted>) Then
Log.Enabled = True
Log.Warning ...
End If
...
' post default TestComplete message to the Log
LogParams.Locked = False
Log.Enabled = True
<EndOfOnLogErrorHandler>
> Only drawback of this solution is, that when I doubleclick on the warning-line in the results-tab I will be redirected to my script instead of the corresponding checkpoint within the test.
Switch to the Call Stack pane in the Log (View | Panels | ... in the main menu) and I hope that the second line from the top should point to the keyword test. Double-click it and I beleive it will navigate you to the correct line in the keyword test (I just don't use keyword tests that is why I am so uncertain as for the keyword tests, but the described approach (navigation through the Call Stack pane) works great for regular coding approach).
Hope the above will help you...
> Is there any possibility to change the error-level of failed checkpoints via jscript to warning?
Yes, you should be able to do this using the approach I mentioned earlier when replying to Robert.
Something like that (untested VBScript mockup):
OnLogErrorHandler:
...
' to prevent posting the default TestComplete messages to the Log
LogParams.Locked = True
Log.Enabled = False
If (<WarningShouldBePosted>) Then
Log.Enabled = True
Log.Warning ...
End If
...
' post default TestComplete message to the Log
LogParams.Locked = False
Log.Enabled = True
<EndOfOnLogErrorHandler>
> Only drawback of this solution is, that when I doubleclick on the warning-line in the results-tab I will be redirected to my script instead of the corresponding checkpoint within the test.
Switch to the Call Stack pane in the Log (View | Panels | ... in the main menu) and I hope that the second line from the top should point to the keyword test. Double-click it and I beleive it will navigate you to the correct line in the keyword test (I just don't use keyword tests that is why I am so uncertain as for the keyword tests, but the described approach (navigation through the Call Stack pane) works great for regular coding approach).
Hope the above will help you...