Forum Discussion

vthomeschoolmom's avatar
vthomeschoolmom
Super Contributor
5 years ago
Solved

ProjectSuite.TestItems.Current.ProjectName has no value

So I have an event in a script unit that is shared. 

 

var currentProject = "default project";
currentProject = ProjectSuite.TestItems.Current.ProjectName;

 

... do a small condition around the current project where the majority of the event is shared. 

 

It is supposed to be a read only value.

 

I am in TestComplete. I have one of two projects open. I have a break point on currentProject = ...

I run the project from the run project button on the toolbar. (I am not running directly from a test or function or something...)

 

Sad Stephie does not know what she is doing wrong. :( Thanks!

 

https://support.smartbear.com/testcomplete/docs/reference/project-objects/project-suite/testitem/projectname.html

  • You can only acces the ProjectSuite object if you are running the suite, not the project, otherwise it doesn't exist.

     

    If you run the suite and not the project should work.

2 Replies

  • cunderw's avatar
    cunderw
    Community Hero

    You can only acces the ProjectSuite object if you are running the suite, not the project, otherwise it doesn't exist.

     

    If you run the suite and not the project should work.