Forum Discussion

slhollow's avatar
slhollow
New Contributor
7 years ago

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.

4 Replies

  • NisHera's avatar
    NisHera
    Valued Contributor

    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")

    • slhollow's avatar
      slhollow
      New Contributor

      I would like to see this as a feature enhancement for Test Complete then.

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        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.

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    Why not create watch items?  It's built in and only takes a couple of clicks.