ClickOnce Application Parameters

Applies to TestComplete 15.69, last modified on November 13, 2024

The Tested Applications collection can include ClickOnce applications. These applications are installed and launched from a web page or a special shortcut rather than via a standalone executable.

Parameters of ClickOnce tested applications in the TestedApps editor are organized into two sections - Basic Parameters and Run-Mode Parameters.

Basic Parameters

Basic parameters include the following:

Parameter Description
Name The unique name of the tested application in the Tested Applications collection. This name is used to refer to the application in tests, for example, in the Run TestedApp keyword test operation.
Count The number of application instances that will be simultaneously launched during the test recording or run.
Autorun application on recording Select this option to have the application launched automatically when you start test recording.
Launch application from tests Uncheck this option to prevent the application from being launched by the Run TestedApp keyword test operation and the TestedApps.AppName.Run scripting method.

For example, you can define several instances of the tested application with different configurations and “disable” those not needed at the moment.

Use special runtime object This option controls the scripting interface to the tested application.

If it is enabled, you can get and set the application parameters directly via the TestedApp.AppName object. This object is a ClickOnceTestedApp object.

If it is disabled (not recommended except for legacy tests), TestedApp.AppName returns a generic TestedApp object that contains properties and methods common to all application types. To set ClickOnce-specific parameters, use the TestedApps.AppName.Params.ClickOnceParams property.

Run-Mode Parameters

The following parameters are specific to ClickOnce applications in the Tested Applications collection:

Parameter Description
Startup link The URL or file path of either the application deployment manifest (.application) or the application’s Start menu or desktop shortcut (.appref-ms). For example:
  • http://www.example.com/myapp/MyApp.application
  • http://www.example.com/myapp/MyApp.application?param1=value1&param2=value2
  • \\server\sharedfolder\MyApp.application
  • %APPDATA%\Microsoft\Windows\Start Menu\Programs\MyCompany\MyApp.appref-ms

You can enter the file path manually or you can click the button and browse for the desired file on your local computer or the network.

The file path can include environment variables, such as %USERPROFILE%, as well as project and project suite variables in the format $(VarName). For more information, see Using Variables in Tested Application Paths.

Process to wait The file name of the application’s executable. For example, MyApp.exe.
Wait timeout The maximum waiting time (in milliseconds) for the application to launch. Make sure to specify a timeout sufficient to complete installing of application updates (if any) at the application startup.
Allow TestComplete to interact with embedded Chromium content

For CEF applications launched by using the ClickOnce technology, this parameter indicates whether TestComplete is allowed to access the Chromium contents of the application.

Note: If you run your application outside TestComplete, or if you run it from TestComplete and enable the above-mentioned option while your application is running, you will face issues with object recognition. TestComplete will notify you about this issue and show the Dfsvc.exe was launched before the tested application message. To resolve the issue, terminate the dfcvc.exe process, close the tested application, enable the option in TestComplete and launch the application again.

See Also

About Tested Applications
Testing ClickOnce Applications
TestedApps Editor
Run Modes and Parameters
Using Variables in Tested Application Paths

Highlight search results