Forum Discussion

Manfred_F's avatar
Manfred_F
Regular Contributor
8 years ago

open/close log nodes by script

I want to open and Close the nodes of a given log by script. Thus, I want to navigate to a certain hierarchy Level.

Can this be done?

9 Replies

    • Manfred_F's avatar
      Manfred_F
      Regular Contributor

      Well, I want something else.

       

      The test has run, the log is written. OK.

      Now, I want to open the log's nodes to a certain extent to give me a comfortable view on the log.

      This means: Show the Information on an adequate Level, but hide subordinate Levels.

       

      So far, I have to do this manually.

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        So... once the test is completed and all the scripts are run... you want to manipulate the log via script? I'm a little confused. Once TestComplete is done and the log is displayed on screen, there are no further running scripts... consider that the "program" has completed and exited. So, I'm not sure precisely what you are wanting to do.  

         

        Suffice it to say, if there is information that is in the log that you don't want to be there, that is up to you how much stuff gets logged. Letting TestComplete do the default logging is good for basic stuff, but the more control you want over the log contents, the more deliberate you need to be in incorporating logging code in your automation.

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    Is this what you mean?

     

    'Creates a log folder and makes it the current folder to which messages will be posted. This folder can contain messages of different types as well as subfolders.
    Call Log.AppendFolder("Start this log", "")

     


    'Pops the folder that is currently at the top of the folder stack out of the stack. This makes the folder that will become the top of the stack the default folder of the test log.
    Call Log.PopLogFolder

  • SumanthKotha's avatar
    SumanthKotha
    Occasional Contributor
    For better understanding your question can you give a snap of final log how it looks after you do changes manually?