FullFileName Property

Applies to TestComplete 15.63, last modified on April 23, 2024

Description

Use the TestedApp.FullFileName property to obtain the fully qualified name (with the file path and extension) of the tested application that corresponds to the TestedApp. This value does not contain environment variables such as %USERPROFILE% or %SYSTEMROOT%. The variables are replaced with the appropriate folder names.

Declaration

TestedAppObj.FullFileName

Read-Only Property String
TestedAppObj An expression, variable or parameter that specifies a reference to a TestedApp object

Applies To

The property is applied to the following object:

Property Value

The fully qualified name of the application’s file (with the file path and extension).

Example

The following code obtains information on the tested applications and posts it to the test log:

JavaScript, JScript

function Test()
{

  var TestApp, Count, i, Name, Path, Date, Time, Size;

  Count = TestedApps.Count;
  if (Count > 0)
    {
    Log.AppendFolder("The project contains the following tested applications:");
    for (i = 0; i < Count; i++)
      {
      // Obtains the tested application
      TestApp = TestedApps.Items(i);
      // Obtains the tested application’s name
      Name = TestApp.ItemName;
      // Obtains the full file name of the tested application
      Path = "File: " + TestApp.FullFileName;
      // Obtains the date of the tested application’s last modification
      Date = "Date: " + aqConvert.DateTimeToFormatStr(TestApp.Date, "%m/%d/%Y");
      // Obtains the time of the tested application’s last modification
      Time = "Time: " + aqConvert.DateTimeToFormatStr(TestApp.Time, "%H:%M:%S");
      // Obtains the size of the tested application
      Size = "Size: " + aqConvert.IntToStr(TestApp.Size) + " bytes";
      // Posts information on the tested application to the test log
      Log.Message(Name, Path + "\r\n" + Date + "\r\n" + Time + "\r\n" + Size)

      }
    }
  Log.PopLogFolder();

}

Python

def Test():
  Count = TestedApps.Count
  if Count > 0:
    Log.AppendFolder("The project contains the following tested applications:")
    for i in range(0, Count):
      # Obtains the tested application 
      TestApp = TestedApps.Items[i]
      # Obtains the tested application's name 
      Name = TestApp.ItemName
      # Obtains the full file name of the tested application 
      Path = "File: " + TestApp.FullFileName
      # Obtains the date of the tested application's last modification 
      Date = "Date: " + aqConvert.DateTimeToFormatStr(TestApp.Date, "%m/%d/%Y")
      # Obtains the time of the tested application's last modification 
      Time = "Time: " + aqConvert.DateTimeToFormatStr(TestApp.Time, "%H:%M:%S");
      # Obtains the size of the tested application 
      Size = "Size: " + aqConvert.IntToStr(TestApp.Size) + " bytes";
      # Posts information on the tested application to the test log 
      Log.Message(Name, Path + "\r\n" + Date + "\r\n" + Time + "\r\n" + Size)
  Log.PopLogFolder()

VBScript

Sub Test

  Dim TestApp, Count, i, Name, Path, Date, Time, Size

  Count = TestedApps.Count
  If Count > 0 Then
    Log.AppendFolder("The project contains the following tested applications:")
    For i = 0 To Count - 1

      ' Obtains the tested application
      Set TestApp = TestedApps.Items(i)
      ' Obtains the tested application’s name
      Name = TestApp.ItemName
      ' Obtains the full file name of the tested application
      Path = "File: " & TestApp.FullFileName
      ' Obtains the date of the tested application’s last modification
      Date = "Date: " & aqConvert.DateTimeToFormatStr(TestApp.Date, "%m/%d/%Y")
      ' Obtains the time of the tested application’s last modification
      Time = "Time: " & aqConvert.DateTimeToFormatStr(TestApp.Time, "%H:%M:%S")
      ' Obtains the size of the tested application
      Size = "Size: " & aqConvert.IntToStr(TestApp.Size) & " bytes"
      ' Posts information on the tested application to the test log
      Call Log.Message(Name, Path & vbCrLf & Date & vbCrLf & Time & vbCrLf & Size)

    Next
  End If
  Log.PopLogFolder

End Sub

DelphiScript

procedure Test();
var TestApp, Count, i, Name, Path, Date, Time, Size;

begin

  Count := TestedApps.Count;
  if Count > 0 then
    begin
    Log.AppendFolder('The project contains the following tested applications:');
    for i := 0 to Count - 1 do
      begin
      // Obtains the tested application
      TestApp := TestedApps.Items(i);
      // Obtains the tested application’s name
      Name := TestApp.ItemName;
      // Obtains the full file name of the tested application
      Path := 'File: ' + TestApp.FullFileName;
      // Obtains the date of the tested application’s last modification
      Date := 'Date: ' + aqConvert.DateTimeToFormatStr(TestApp.Date, '%m/%d/%Y');
      // Obtains the time of the tested application’s last modification
      Time := 'Time: ' + aqConvert.DateTimeToFormatStr(TestApp.Time, '%H:%M:%S');
      // Obtains the size of the tested application
      Size := 'Size: ' + aqConvert.IntToStr(TestApp.Size) + ' bytes';
      // Posts information on the tested application to the test log
      Log.Message(Name, Path + #13#10 + Date + #13#10 + Time + #13#10 + Size)

      end;
    end;
  Log.PopLogFolder;

end;

C++Script, C#Script

function Test()
{

  var TestApp, Count, i, Name, Path, Date, Time, Size;

  Count = TestedApps["Count"];
  if (Count > 0)
    {
    Log["AppendFolder"]("The project contains the following tested applications:");
    for (i = 0; i < Count; i++)
      {
      // Obtains the tested application
      TestApp = TestedApps["Items"](i);
      // Obtains the tested application’s name
      Name = TestApp["ItemName"];
      // Obtains the full file name of the tested application
      Path = "File: " + TestApp["FullFileName"];
      // Obtains the date of the tested application’s last modification
      Date = "Date: " + aqConvert["DateTimeToFormatStr"](TestApp["Date"], "%m/%d/%Y");
      // Obtains the time of the tested application’s last modification
      Time = "Time: " + aqConvert["DateTimeToFormatStr"](TestApp["Time"], "%H:%M:%S");
      // Obtains the size of the tested application
      Size = "Size: " + aqConvert["IntToStr"](TestApp["Size"]) + " bytes";
      // Posts information on the tested application to the test log
      Log["Message"](Name, Path + "\r\n" + Date + "\r\n" + Time + "\r\n" + Size)

      }
    }
  Log["PopLogFolder"]();

}

See Also

FileName Property
Path Property

Highlight search results