Ask a Question

Click() comment


Click() comment

Hi all,


I had a question concerning the Click() method in Testcomplete.

Everytime I click an item it shows in the test details.

BUT it does not say exactly what it clicked. To make my test more clear I would love to be able to add a comment to every click I make so I can quickly see what it is that happened. 

Right now I solve this by just clicking something using 'Click()' and after that line log a message using 'Log.Message' saying what was clicked but it would be easier if it could be done at once. 

Is there some kind of solution for this kind of thing or not?


Something in the line of what happens when logging pictures 'Log.Picture(PicObj,"message").





Are you using KeyWord Tests to create the tests?
If you are, expand the recording widget you can add comments during runtime: 


no I am writing scripts myself.

Thanks though!

I wonder what you would get if you record a keyword test the way @mattb suggested and then use the Convert to Script function.  See what code that provides you.

[Community Hero]
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.

Hi @Marsha_R ,

I tried your suggestion and this is what came out;

  //Clicks the 'closeVentilatorBtn' object.
  Aliases.Ofcas_Lk_Api_Service_AddonHost.closeVentilatorBtn.Click(22, 15);

'hello' being the comment I added using @mattb's suggestion.

So not really what I am trying to achieve, was worth the try!



Showing results for 
Search instead for 
Did you mean: