clarkmoss
8 days agoSenior Member
ProjectSuite.Variables.Path is undefined in OnStartTestHandler
I would like the pjs path in the OnStartTestHandler event handler to prefix to a TestedApps application. When I run my test ProjectSuite.Variables.Path is undefined.
Is there another way to get the pjs path in the OnStartTestHandler event handler?
This is my javascript code
function UpdateFilePath(testedApp, path)
{
let app;
// Obtains the tested application's item
app = TestedApps.Items(testedApp);
Log.Message(`Start: ${app.Path} --- ${app.FileName}`);
app.Path = ProjectSuite.Variables.Path + path;
Log.Message(`End: ${app.Path} --- ${app.FileName}`);
return app;
}
If you are looking to obtain the Project Suite path, use ProjectSuite.Path https://support.smartbear.com/testcomplete/docs/reference/project-objects/project-suite/projectsuite/path.html
The ProjectSuite.Variables.Path is referencing a variable called Path to exist in the Project Suite variables https://support.smartbear.com/testcomplete/docs/working-with/managing-projects/common/variables-page.html