cancel
Showing results for 
Search instead for 
Did you mean: 

Can we create a log(separate log file) through script?

SOLVED
New Contributor

Can we create a log(separate log file) through script?

Hi All,

 

Can we create a log (Project .log) through script? I have different test cases running through same function, so need to create a log (new log file )through code for each test cases?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Hero

Re: Can we create a log(separate log file) through script?

Hi,

 

Is it possible to export just the logs in particular folder through script. 

Not sure that I got the question, but nevertheless: the log can be exported (manually or via Log.SaveResultsAs() ) as a whole only.

To get a part of the log, you can export the whole log and parse it manually then.

 

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

5 REPLIES 5
Community Hero

Re: Can we create a log(separate log file) through script?

Hi,

 

No this is not possible.

Consider Log.AppendFolder() or aqTestCase  object.

 

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
================================
New Contributor

Re: Can we create a log(separate log file) through script?

Thank you Alex.. Is it possible to export just the logs in particular folder through script. we can manually export ( export current row),can we do it through code?
Occasional Contributor

Re: Can we create a log(separate log file) through script?

Hello.

 

Yes, you can export your logs to a specific path via

 

Log.SaveResultsAs(FileNameLogFormatExportVisualizerImagesLogScope)

 

FileName would be the path to your file destination e.g. C:\Users\Public\Documents\mylog.mht

 

But remember that you can not simply export certain rows if you use a encrypted mht file, therefore you should probaly use the HTML format.

 

lsHTML1HTML format – a web page with accompanying images, stylesheets and other data files. The FileName parameter specifies the folder to save the files. The web page name is index.htm.

 

Greetings Leon

Community Hero

Re: Can we create a log(separate log file) through script?

Hi,

 

Is it possible to export just the logs in particular folder through script. 

Not sure that I got the question, but nevertheless: the log can be exported (manually or via Log.SaveResultsAs() ) as a whole only.

To get a part of the log, you can export the whole log and parse it manually then.

 

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

Community Manager

Re: Can we create a log(separate log file) through script?

Thank you Community!

 

@hrshilpashree did the community members answer your question? Please mark the best answer as a Solution. This will really help people searching for answers here in the future. Thank you!


Sonya Mihaljova
Community and Education Specialist

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors