Forum Discussion
As far as I know, not directly via the CBT integration.
I contacted the support team few days and here is the replay we get.
There is another way you can bring the mht file path. you can include a Log.File command to which will save an instance of the file you want to keep in the local test directory. Link on how to use the method is below:
https://support.smartbear.com/testcomplete/docs/reference/project-objects/test-log/log/file.html
I am not sure how Log.File will work in this case.
Thanks
Nishchal
- tristaanogre6 years agoEsteemed Contributor
Hrm.... OK, I THINK I know what they are saying...
so, in your code, you call the Log.ExportToFile method to export the MHT. They are suggesting adding the Log.File method after that to pull that MHT file into the log. That log is then copied back to your local machine as part of the CBT log. Your MHT file is then there and present, just need to save the attachment.- nisgupta6 years agoValued Contributor
Little bit help needed here . Attached here is the file which shows how we are iimplementing this MHT report.
Now Log.File need to put where ?
Thanks
Nishchal
- tristaanogre6 years agoEsteemed Contributor
I would add to the end of exportMHTReport a call to Log.File to attached the indicated file. It really is that simple. Just a call to make sure that the MHT file is included in the log so that, when the CBT execution is complete, it's returned back in the generated log.
Again, what you need to remember is that MHT export that you're doing is exporting the MHT to a local hard drive on the virtual machine that CBT spins up. And when the execution is done, that file is gone. To persist that file back to your main machine, you need to do something to bring it back. Log.File does that.
https://support.smartbear.com/testcomplete/docs/reference/project-objects/test-log/log/file.html
Related Content
Recent Discussions
- 4 hours agoSvetaG