Forum Discussion

hyper111's avatar
hyper111
Contributor
11 years ago
Solved

How can I post screenshot and text to the same test log item?

Hi,



I would like to know how can I do that. I know how log something(ex. text) and screen but each at the separate test log item.



Thanks,
  • You can use this script



    /**

    * Saves printscreen to logs <br>

    * @method PrintScreen

    */

    function PrintScreen()

    {

      Log.Picture(Sys.Desktop.Picture(), "PRINTSCREEN");

    }

8 Replies


  • Hi Paul,


     


    Another approach you may like is to pass a picture to the Log.Message method:


     




    //JScript


    Log.Message("MessageText","", pmNormal, null, Sys.Desktop.Picture());



  • jorgesimoes1983's avatar
    jorgesimoes1983
    Regular Contributor
    You can use this script



    /**

    * Saves printscreen to logs <br>

    * @method PrintScreen

    */

    function PrintScreen()

    {

      Log.Picture(Sys.Desktop.Picture(), "PRINTSCREEN");

    }
  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    That's the visualizer feature of TestComplete.  When you play back a test script, all screenshots and interactions are sent t the test log.  This can be turned on in the project properties.



    Because visualizer and such generates a LOT of data on the hard drive, it's not something I'd necessarily recommend for all projects.  

  • Hi Paul,


     


    You can enable the Capture images only or Capture images and test object info option under Collect Test Visualizer data during test run to activate Visualizer.


     


  • Hi,

     



    I use field.click method, why not all clicks send a screenshot to the logs?



     



    Regards,



  • Thanks for reply!



    In my case it won't be problem.

    Where can I turn it on?



    Properties>Playback/Visualizer..and? I do not see any similar option.



    Regards,