Ask a Question

Get last log action during test execution

New Contributor

Get last log action during test execution



I need to get the lastest action on the test log to determine where it was performed (edit, checkbox, radiobutton...).


The way I've thought about doing it is to use onLogEvent, so everytime the script enters the function it'll generate a string with the Additional Information tab of the test log, and then store it.


How can I get the text of the last action event on the test log, during test execution?


I am using TestComplete 8.


English is not my first language, sorry for any mistakes.

Thanks, in advance.



I'm curious as to know why you need a separate item on your test log to tell you the last object that you interacted with. If you elaborate the end goal of this outcome, then perhaps the community can provide some workarounds for you. 

"How can I get the text of the last action event on the test log, during test execution?"- if I'm understanding that correctly, you want the information about what TC is interacting with to show up during the test execution? Then, working with the Indicator object may be your best bet by pushing certain messages telling you what object you are interacting with

But with that said, since TC tends to work as fast as possible, chances are you wont even see the indicator text message during the test execution while it runs (otherwise you may need to put in additional delays and while loops to see this message long enough for our eyes to catch it; in which case we are slowing down our automation runs which is kind of counter intuitive...) 

If i completely missed the mark, my apologies! but any further clarification might help!


one last note is, whatever functionality or improvements that you are looking for may already exist inside of newer versions of testcomplete. I am not familiar with TC8, but the new test logs look like this, where it shows within the details tab, the object that it interacted with along with the action that was performed... It may be in your best interest (with regards to the time investment it may take you to solve this on your own) to just upgrade your TC 🙂

For your reference, this is what the test logs look like for TC14.4image.png


Justin Kim
New Contributor

Hello again,


What i'm trying to do is to store the text on the "Details" tab onto a variable, during test execution. TC8 log's are very similar to the one you showed, as seen in the image below



My goal with this is to create a report of the most used screens of our software within TC, and to meet our specifications, I have to do it this way. With the information of the log, I'll be able to do it during test execution, skipping the part where I would be analysing manually each test.


Unfortunately, I can't upgrade to TC 14.4 due to financial reasons.





Esteemed Contributor

Yeah, at this point, I'd use the OnLogEvents handler to trap the message text and dump it to your variable or even output to a file.

Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
Showing results for 
Search instead for 
Did you mean: