Forum Discussion

Jaime's avatar
Jaime
Occasional Contributor
3 years ago

TestComplete - Any way to Post an Image on Error at the script level and not the project level?

TestComplete - Any way to Post an Image on Error at the script level and not the project level?

 

I have a project full of scripts, but some, I cannot grab images due to sensitive data, but others scripts that are not sensitive and in the same project, I want to grab images on errors.  Can TestComplete handle this scenario, and if so, how?

 

Thank you!!

Jaime

6 Replies

    • Jaime's avatar
      Jaime
      Occasional Contributor

      Hi Marsha_R!

       

      Thank you - although, I am now able to generate an event that grabs a screenshot on Log.Error. But I can't seem to find how to make an event only apply to tagged tests... Any ideas?

       

      Thank you so much!!!

       

      Jaime

      • Jaime's avatar
        Jaime
        Occasional Contributor

        Playing around with code...

         


        function EventControl1_OnLogError(Sender, LogParams)
        {
        If (@functional.Exists){
        Log.Picture(Sys.Desktop.Picture(), "Capture Image on Failure", "", pmHighest);
        }
        }

         

        //  Seems to not recognize the tag of @functional.  Ideas? Thanks!!!