Forum Discussion
7 Replies
- tristaanogreEsteemed Contributor
Log.Path will return the file location of the log files for the current test run.
https://support.smartbear.com/testcomplete/docs/reference/project-objects/test-log/log/path.html
- DKNPOccasional 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
- tristaanogreEsteemed Contributor
How are you getting access to previous log results? That's going to determine how to go forward.
- DKNPOccasional 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
- tristaanogreEsteemed 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.
Related Content
- 10 months agolodecesa
- 10 months agoKimdoengart
- 2 years agoTaz
Recent Discussions
- 5 minutes agoashly