ProjectSuite.Path Property

Applies to TestComplete 15.31, last modified on March 17, 2022

Description

This property returns the path to the folder that contains the current TestComplete project suite (.pjs file).

Declaration

ProjectSuite.Path

Read-Only Property String

Applies To

The property is applied to the following object:

Property Value

A string that represents the path to the folder that contains the current project suite. The string holds the trailing slash character (\).

Example

The following example demonstrates how to obtain the path to the folder that stores the current project suite and how to create a new folder in that folder.

JavaScript, JScript

function ProjectSuiteSample()
{

  var Path;
  // Obtains the path to the current project suite’s file
  Path = ProjectSuite.Path;
  Path = Path + "\\ProjectSuiteResources";
  // Creates a new folder
  aqFileSystem.CreateFolder(Path);

  …

}

Python

def ProjectSuiteSample():
  # Obtains the path to the current project suite's file
  Path = ProjectSuite.Path
  Path = Path + "\\ProjectSuiteResources"
  # Creates a new folder
  aqFileSystem.CreateFolder(Path)

VBScript

Sub ProjectSuiteSample

  Dim Path
  ' Obtains the path to the current project suite’s file
  Path = ProjectSuite.Path
  Path = Path & "\ProjectSuiteResources"
  ' Creates a new folder
  aqFileSystem.CreateFolder(Path)

  …

End Sub

DelphiScript

procedure ProjectSuiteSample();
var Path;
begin

  // Obtains the path to the current project suite’s file
  Path := ProjectSuite.Path;
  Path := Path + '\ProjectSuiteResources';
  // Creates a new folder
  aqFileSystem.CreateFolder(Path);

  …

end;

C++Script, C#Script

function ProjectSuiteSample()
{

  var Path;
  // Obtains the path to the current project suite’s file
  Path = ProjectSuite["Path"];
  Path = Path + "\\ProjectSuiteResources";
  // Creates a new folder
  aqFileSystem["CreateFolder"](Path);

  …

}

See Also

ProjectSuite.FileName
ProjectSuite.ConfigPath
Project.Path
Project.FileName

Highlight search results