I loaded a project in silk test. Is there any function which returns the name of the loaded project?
Thanks for your help in advance...
you can use the following
<font class="small">Code:</font><hr /><pre>
[+] STRING GetCurrentProjectName()
[ ] INTEGER i = 1
[ ] i++
[ ] return (GetField(GetProgramDir(),"\",(i-1)))
it returns the directory of the script that is running. (which the currently loaded project).
I hope this helps you.
Try and fail, but don't fail to try
Thanks Krishna Chaitanya.
This is fine, but it may not work always. If the script which is calling this function is NOT in Project folder, this may not work.
Is there any other way to find out the loaded project in the silk test?
You can use the INI file functions to query partner.ini for the Current Project as shown in the INI file here:
CurrentProject=C:\Program Files\Borland\SilkTest\Projects\MyProject\MyProjec t.vtp
I am always seeing blank value for this item in Partner.ini file.
1) Open project in SilkTest.
2) Close SilkTest
3) Open project in SilkTest.
4) CurrentProject is in partner.ini