cancel
Showing results for 
Search instead for 
Did you mean: 

Read the status of .mht file which is already Exported

SOLVED
K_Sathish_Kumar
Contributor

Read the status of .mht file which is already Exported

Hi Team,

 

I am trying to read the status of log file which is already exported by using the TestComplete Command Line using powershell script.

please help me out with the logic to achieve the same.

thanks in advance.

 

Thanks and Regards,

Sathish Kumar K

Regards,
Sathish Kumar K
1 ACCEPTED SOLUTION

Accepted Solutions
AlexKaras
Community Hero

Re: Read the status of .mht file which is already Exported

Hi,

 

.mht files are archives that contain the whole web page along with all required additional resources.

Something from below might inspire you with some sort of solution applicable for your project:

https://forum.katalon.com/t/saving-web-page-as-mhtml-in-katalon-studio/49368

https://stackoverflow.com/questions/3230305/how-to-read-or-parse-mhtml-mht-files-in-java

https://www.google.com/search?q=jscript+parse+mht+file

 

P.S. Somewhere in time there was a sample project published either on this forum or on SmartBear's site about analysis of the .mht log, but I don't have it at hand at the moment.

 

Update: Found it. It appeared to be not TestComplete project but just a powershell script. Though it looks like that it contains what you are looking for.

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

View solution in original post

12 REPLIES 12
Marsha_R
Community Hero

Re: Read the status of .mht file which is already Exported

Give us a screenshot of the log file you are looking at and mark which part you are trying to read.   

K_Sathish_Kumar
Contributor

Re: Read the status of .mht file which is already Exported

Hi @Marsha_R ,

 

we are using power shell script to initiate the execution of testcase and using the command line argument to export log file(.mht file) to local destination folder.
can you please tell me how to fetch the execution status of the log after exporting(attached the image of Log for your reference)
waiting for your valuable response.

Thanks and Regards,
Sathish Kumar K

Regards,
Sathish Kumar K
Marsha_R
Community Hero

Re: Read the status of .mht file which is already Exported

.mht files are viewable in Internet Explorer

 

If you need to review the log some other way, there are several options for exporting log files that may be more useful.

https://support.smartbear.com/testcomplete/docs/testing-with/log/working-with/exporting/index.html

K_Sathish_Kumar
Contributor

Re: Read the status of .mht file which is already Exported

Actually I'm trying to fetch the log status using code.
Please guide me with this.

Thanks
Regards,
Sathish Kumar K
Marsha_R
Community Hero

Re: Read the status of .mht file which is already Exported

Do not use the mht version of the log export because you can only view it in Internet Explorer.

 

Go to this link and pick a different format to export the log.  You will then be able to look at the result with code.

https://support.smartbear.com/testcomplete/docs/testing-with/log/working-with/exporting/index.html

 

 

K_Sathish_Kumar
Contributor

Re: Read the status of .mht file which is already Exported

@Marsha_R ,

 

can you please help me out with what format to export the log as and also the snippet to read the status of the log using code.

 

Thanks,

Sathish Kumar K

Regards,
Sathish Kumar K
Marsha_R
Community Hero

Re: Read the status of .mht file which is already Exported

Try exporting it to xml and then you look at the file and find what you want to parse out.  Show me a screenshot of that and tell me what you want out of the file.

 

 

K_Sathish_Kumar
Contributor

Re: Read the status of .mht file which is already Exported

i would not be able to see the images which are captured as part of execution if i export the log as xml.

thats the reason i wanted to export it as .mht file.

 

Please suggest me any other alternatives.

 

Thanks,

Sathish

Regards,
Sathish Kumar K
Marsha_R
Community Hero

Re: Read the status of .mht file which is already Exported

Here are more instructions on how to access test log contents.  Try this by yourself and then post the results here and we can help you further.

 

https://support.smartbear.com/testcomplete/docs/testing-with/log/working-with/from-tests.html

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors