Forum Discussion

DKNP's avatar
DKNP
Occasional Contributor
7 years ago

Testlog Object - Getting the foldername where the selected TestLog object contents are stored

Hi

 

I am currently writing a script to interact with the testlog object and its child structure.

 

As part of the process i need to know the folder name where the contents are stored.

 

I cannot seem to be able to get this from the testlog object itself.

 

Does anyone have a solution?

 

Many thanks

7 Replies

    • DKNP's avatar
      DKNP
      Occasional Contributor

      Thanks, that works where the log is the current one.

       

      If i am interacting with an existing results set, then that property isn't available.

       

      Many thanks

       

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

     

    How are you getting access to previous log results?  That's going to determine how to go forward.

     

    • DKNP's avatar
      DKNP
      Occasional Contributor

      I access the logs using the following method

       

      For latest log - Project.Logs.LogItem(Project.Logs.LogItemsCount - 1)

      For designated log i pass in its index Project.Logs.LogItem(0)

       

      Many thanks

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        Unfortunately, using that method, you're not accessing the log file itself but the references within the project to the logs.  There's no property directly of that containing the path name of the corresponding log file.

         

        May I ask what you need the folder information for?  Looking at what's available, getting to the specific path of a specific log from the objects available to code is going to be a rather complex endeavor.  If there is some other way that is less complicated to meet your needs, that might be the better route.