slhollow
7 years agoNew Contributor
display print statements
How can I display python print statements inside libraries I created inside of TestComplete or in a dialog window and update the contents instead of creating watch items.
How can I display python print statements inside libraries I created inside of TestComplete or in a dialog window and update the contents instead of creating watch items.
watch Items is used in debugging but python print is printing to screen after run.
I think Log message is more closer to print rather than watch.
In test complete you can not print, best solution would be using Log.message("What ever need to print")
I would like to see this as a feature enhancement for Test Complete then.
There's nothing to "print". This is Python adapted for use in the TestComplete automation tool so that those who can write Python code can write automation code. However, there's nothing to "print" to. There's no browser, no application window, no console window, etc., to "print" to.
So, as suggested by Marsha_R, if you want to alter the values of a variable or object property during a test run debugging session, use watch items. If you want to "output" some message for evaluation after the test is complete, use Log.Message.
Why not create watch items? It's built in and only takes a couple of clicks.