Forum Discussion

siddharth_laddh's avatar
siddharth_laddh
New Contributor
10 years ago

Test complete doesn't click Pictures in Successful Re-run , it only clicks when there is an Error

TestComplete Version 10.20.933.7 doesn't click pictures during successful step in Re-run, it will only click when an Error occurs in the Test-Step.





How to change setting to capture Images during the whole Successful Re-Run?

5 Replies

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)


    Hi Siddharth,


     


    TestComplete posts an image to the Test Log as the Playback | Log | Post image on error project setting is enabled.


     


    If you want to keep images of all actions done during the test, you can use the Visualizer feature. Refer to the "Test Visualizer" article to learn more about it.


     




  • Hi Tanya,



    Thank you for your help. I wanted to keep images of all actions done during the test, so I Enabled the setting in Collect Test Visualizer Data during Test Run in  the Visualizer.





    But even after that it does not click Pictures . Even if it does, its not shown in the Log.



    Also after few runs , the Setting gets Disabled Automatically.



    Test Complete Version - 10.20.933.7 



    Please let me know if I'm doing wrong or there is a bug in the Test-complete.



    Thank you

    Siddharth Laddha



     

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)


    Hi Siddharth,


     


    The pictures are shown in the Visualizer window in your test. Posting all images to the Test Log will lead to the fact that the size of the log file will be huge. Do you really want to see the pictures of all your actions in the Test Log?


     




  • Hi Tanya,



    Yes. Sometimes we need to click Pictures for all the Steps.



    So if that is possible , please let me know the Settings for it.



    Thank you

    Siddharth
  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Siddharth,


     


    There is no option to enable this. You can try implementing an alternative approach:


    TestComplete posts event messages for each action performed during the test to the Test Log. You can process this event in the way you need. For this, do the following:


    1. Create the OnLogEvent event handler in your test.


    2. Add the following code that will post a screenshot of the screen to the Test Log to the event handler:


    var w = Sys.Desktop.ActiveWindow();


    Log.Picture(w, "Active window", w.FullName);