CheckProperty(tbl, "RowCount", cmpGreaterOrEqual, 1); yields the text
"The property checkpoint passed: RowCount is greater than or equal to 1."
I would like to change this text and leave the additional info
The property checkpoint passed: Aliases.browser.pageMain...entDetail.tblActivities.RowCount is greater than or equal to 1.
...
As is. I would like the line in the log to match manual tester speak as they will compare the results to a test case. I think this can be done, but I am not remembering how. I like the simple CheckPropeerty code line... I would like a solutiont hat I can use across many checkpoints in my solution without writing if conditions for my in code checkpoints.
Thanks
Solved! Go to Solution.
There is an OnLogCheckpoint event handler available in TestComplete. Basically, when you log the checkpoint, it fires that event. You can then assign code to the event to execute each time the event fires. Within that code, you can intercept the text of the message and change it before writing it out to the log.
Because it's an event intercepting the writing of a record to the log, it only has available to it whatever is in the process of writing that log record. String processing is your best bet.
There is an OnLogCheckpoint event handler available in TestComplete. Basically, when you log the checkpoint, it fires that event. You can then assign code to the event to execute each time the event fires. Within that code, you can intercept the text of the message and change it before writing it out to the log.
Sweet. Thanks.
It's kind of a bummer that the LogParams does not contain the object as parameter rather than only the message text and additional info.
By some magic that you know, is there any way to know the object without yucky string manipulation? Thanks
function GeneralEvents_OnLogCheckpoint(Sender, LogParams)
Because it's an event intercepting the writing of a record to the log, it only has available to it whatever is in the process of writing that log record. String processing is your best bet.
Hi,
Alternative approach is to use the aqObject.CompareProperty method and wrap it with the helper function to log either nice greet checkmark in case of success or an error/warning in case of failure.
Sample pseudocode:
if (aqObject.CompareProperty(<Property>, <Condition>, <Value>, <CaseSensitive>, BuiltIn.lmNone))
Log.Checkpoint(<Whatever message with proofing screenshot that you like>);
else
Log.Error(...);
Well geez, that works too. Thanks to you both.
Subject | Author | Latest Post |
---|---|---|