Forum Discussion

saurabh1484's avatar
saurabh1484
Contributor
14 years ago

How to get the script name in code

Hi,



Is there any way to get the current running script name using c# script?



Regards,

Saurabh
  • Hi Saurabh,



    If you use test items to organize your tests, the following code snippet will return a string containing the script name:

    Project.TestItems.Current.ElementToBeRun.Caption