Forum Discussion
- rraghvaniChampion Level 3
I don't think that is possible. You either use TestComplete log message or create your own log message.
If you read the documentation on the links that I have provided, it will give you more information.
- rraghvaniChampion Level 3
Personally, I wouldn't make the scripts complicated. Clicking on the error message will take you to the line of code where the error has occurred, the log details will give an indication as to what object TestComplete was not able to find or interact with.
- rraghvaniChampion Level 3
How do you want to customise the test log? Can you give an example please? The coding you have provided doesn't indicate what you require - or I don't understand!
- avinashshuklaOccasional Contributor
In test complete script test log window show as :
The log msg on success execution of code:
The window was clicked with the left mouse button. 14:22:48 Normal 3.42
The toolbar item 'toolStripBtnAck' was clicked with the left mouse button. 14:22:55 Normal 7.20
The window was clicked with the left mouse button. 14:23:07 Normal 11.77On error it show as:
The object "toolStrip" does not exist. 16:18:21 Higher 18.83
The log messages are auto generated, Which I want to replaced by custom message
eg: Alarm button not found etc.
Also attached the default log msg, which i want to replace with custom message while execution of script.
- rraghvaniChampion Level 3
Refer to Log Object and Posting Messages to the Log. You can use the following methods,
Log.Message("SmartBear") Log.Warning("SmartBear") Log.Error("SmarBear")
You will have to check if the "Alarm Button" does not exist, then output the appropriate message to the log.
- avinashshuklaOccasional Contributor
Thanks,
How can I combine the default msg + custom msg?
eg : Alarm Button + The object "toolStrip" does not exist.
Related Content
- 4 years ago
Recent Discussions
- 10 hours ago
- 2 days ago