Forum Discussion
- YMinaevStaffHi,
You can get the Project object by using the Integration.GetObjectByName method. Once you do this, you should be able to access the project's Variables collection. - esramirezContributorAnd what should go into GetObjectByName() for argument? The name of project or the variable I want to access?
- YMinaevStaffHi,
You need to pass the name of the object you want to obtain to GetObjectByName. Since, you need to get the Project object, pass "Project" as its parameter. It will return the Project object, and you'll be able to use its Variables property to access variables. - esramirezContributorThanks Jared!
I managed to get project object.
Per the online help, GetObjectByName() only works when a test is running. This may not work for me after all because what I want is to be able to update the project variables then start the execution.
Is there any other way to do this using TestComplete COM ? - YMinaevStaffHi,
Unfortunately, there's no other way to do this without modifying project files directly (strongly not recommended). You need to run a test to access run-time objects. - esramirezContributorThat is very unfortunate.
I think the work around would be to rather than using the api to launch the tests is to use TestExecute command line. This way i can pass global variables to the tests.
Are there any plans the api functionality will be expanded in the near future?
Thank you for your time on this matter.
- YMinaevStaffHi,
Unfortunately, I cannot tell you anything specific on this at the moment. Currently, there're no plans to change the present functionality.
Related Content
- 9 years ago
Recent Discussions
- 17 hours ago