Description
A tested application can be run in various modes. Use the DebugParams
property to obtain access to the parameters of the Debug run mode. The TestComplete engine will use these parameters to launch a tested application, if Debug run mode is chosen for this application.
Declaration
TestedAppParamsObj.DebugParams
Read-Only Property | The TestedAppDebugParams object |
TestedAppParamsObj | An expression, variable or parameter that specifies a reference to a TestedAppParams object |
Applies To
The property is applied to the following object:
Property Value
The TestedAppDebugParams
object that provides a scripting interface to the parameters of the Debug run mode.
Example
The following example demonstrates how to modify the tested application’s parameters in script:
JavaScript, JScript
{
var TestApp, Params, DebugParams;
TestApp = TestedApps.Items("SampleApp");
// Obtains the tested application's parameters
Params = TestApp.Params;
// Obtains the parameters of the Debug run mode
DebugParams = Params.DebugParams;
// Modifies the parameters of the Debug run mode
DebugParams.CommandLineParameters = "NotOpenApp";
DebugParams.WorkFolder = "D:\\Work Folder";
// Applies the modified parameters and activates the Debug run mode
DebugParams.Activate();
// Launches the tested application
TestApp.Run();
}
Python
def Test():
TestApp = TestedApps.Items["SampleApp"]
# Obtains the tested application's parameters
Params = TestApp.Params
# Obtains the parameters of the Debug run mode
DebugParams = Params.DebugParams
# Modifies the parameters of the Debug run mode
DebugParams.CommandLineParameters = "NotOpenApp"
DebugParams.WorkFolder = "D:\\Work Folder"
# Applies the modified parameters and activates the Debug run mode
DebugParams.Activate()
# Launches the tested application
TestApp.Run()
VBScript
Dim TestApp, Params, DebugParams
Set TestApp = TestedApps.Items("SampleApp")
' Obtains the tested application's parameters
Set Params = TestApp.Params
' Obtains the parameters of the Debug run mode
Set DebugParams = Params.DebugParams
' Modifies the parameters of the Debug run mode
DebugParams.CommandLineParameters = "NotOpenApp"
DebugParams.WorkFolder = "D:\Work Folder"
' Applies the modified parameters and activates the Debug run mode
DebugParams.Activate
' Launches the tested application
TestApp.Run
End Sub
DelphiScript
var TestApp, Params, DebugParams;
begin
TestApp := TestedApps.Items('SampleApp');
// Obtains the tested application's parameters
Params := TestApp.Params;
// Obtains the parameters of the Debug run mode
DebugParams := Params.DebugParams;
// Modifies the parameters of the Debug run mode
DebugParams.CommandLineParameters := 'NotOpenApp';
DebugParams.WorkFolder := 'D:\Work Folder';
// Applies the modified parameters and activates the Debug run mode
DebugParams.Activate;
// Launches the tested application
TestApp.Run;
end;
C++Script, C#Script
{
var TestApp, Params, DebugParams;
TestApp = TestedApps.Items("SampleApp");
// Obtains the tested application's parameters
Params = TestApp["Params"];
// Obtains the parameters of the Debug run mode
DebugParams = Params["DebugParams"];
// Modifies the parameters of the Debug run mode
DebugParams["CommandLineParameters"] = "NotOpenApp";
DebugParams["WorkFolder"] = "D:\\Work Folder";
// Applies the modified parameters and activates the Debug run mode
DebugParams["Activate"]();
// Launches the tested application
TestApp["Run"]();
}
See Also
Run Modes and Parameters
Editing Desktop Application Parameters
TestedAppRunAsParams Object
TestedAppParams.ActiveParams
TestedAppParams.DebugParams
TestedAppParams.SimpleParams
TestedAppParams.ProfileParams
TestedAppParams.RunAsParams
About Tested Applications