Ask a Question

Save log with currrent project name

SOLVED
asmatullah
Contributor

Save log with currrent project name

Hi ,

I need to save my test result (logs) with the project name .

Is there any way to get the current project name something like Project.Name to display

the project name in log through scripting .

 

I am executing multiple projects and need to save the test logs to some location .

I have written fucntion for saving the logs using  Log.SaveResultsAs() , but problem is

with the name to give to each project log .

I want to read the current project name and pass this name as a parameter to the Save log function .

 

 

5 REPLIES 5
baxatob
Community Hero

You can use Project.FileName

Tried with this option but it gives full path with project names .

I want exactly project name not full path .

Of course it returns the full name of the file (with path), but you can extract what you need using regular expression or by another way.

HKosova
SmartBear Alumni (Retired)

aqFileSystem.GetFileNameWithoutExtension(Project.FileName)

will give you the current project name.


Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

Hi Helen Kosova,

 

Thanks for the solution , I got exactly what I want .

 

cancel
Showing results for 
Search instead for 
Did you mean: