Forum Discussion
'Project.TestItems.Current' and 'ProjectSuite.TestItems.Current' is not the same and does not even have the same interface.
There are no 'ProjectName' property on the TestItem, it is only named 'Name'...
I would like to know the Name of the currently running project (and test file/function) but that seems not to be possible...
- Johan
Ok, there are a lot of ways to get the information you are looking for.
If you want to use Current that is probably not going to work unless you are running the entire project suite.
If you want to use ProjectSuite.TestItem(indexofyourprojecthere) that will give you the properties you are specifically looking for.
If you just want the name of your project and it's file path you can get that from this
(probably an easier method somewhere but this works):
current = ['Name','Path']; current.Name = Project.Path.split('').reverse().join('') .substr(1, Project.Path.split('').reverse().join('').indexOf('\\',1) - 1) .split('').reverse().join(''); current.Path = Project.Path;
- Ryan_Moran9 years agoValued Contributor
Oh, and if you only have one test item for you project then you can simply use Project.TestItems.TestItem(0) in lieu of ProjectSuite.Current.
Related Content
- 4 years ago
- 2 years ago
- 2 years ago
Recent Discussions
- 5 hours ago