Forum Discussion

clarkmoss's avatar
clarkmoss
Senior Member
8 days ago
Solved

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;

}