Description
The Path
property returns the name and full path of the folder that stores log data for the current run of the test item.
Declaration
Applies To
The property is applied to the following object:
Property Value
A string that represents the folder name and path. The string holds the trailing slash character (\
).
Example
The code below obtains the path to the folder that contains the current results and then posts this path to the test log.
JavaScript, JScript
function LogPath()
{
// ...
// Obtains the path to the folder that
// contains the current results
var sPath = Log.Path;
// Posts this path to the test log
Log.Message("You can find the current results here:");
Log.Message(sPath);
}
Python
def LogPath():
# ...
# Obtains the path to the folder that
# contains the current results
sPath = Log.Path
# Posts this path to the test log
Log.Message("You can find the current results here:")
Log.Message(sPath)
VBScript
Sub LogPath()
' ...
' Obtains the path to the folder that
' contains the current results
sPath = Log.Path
' Posts this path to the test log
Log.Message("You can find the current results here:")
Log.Message(sPath)
End Sub
DelphiScript
function LogPath;
var sPath;
begin
// ...
// Obtains the path to the folder that
// contains the current results
sPath := Log.Path;
// Posts this path to the test log
Log.Message('You can find the current results here:');
Log.Message(sPath);
end;
C++Script, C#Script
function LogPath()
{
// ...
// Obtains the path to the folder that
// contains the current results
var sPath = Log["Path"];
// Posts this path to the test log
Log["Message"]("You can find the current results here:");
Log["Message"](sPath);
}