Description
When you launch a ClickOnce application, it may check for application updates and install them before the launch. The WaitTimeout
property specifies the maximum time TestComplete will wait for a ClickOnce application to start when this application is launched from the TestComplete IDE or from tests by using the TestedApps.AppName.Run
method. The timeout value should be sufficient to complete updating the application and to launch it.
The WaitTimeout
property value is the same as the one specified in the Wait timeout parameter of the corresponding ClickOnce application in the TestedApps Editor.
Declaration
ProgObj.WaitTimeout
Read-Write Property | Integer |
ProgObj | An expression, variable or parameter that specifies a reference to one of the objects listed in the Applies To section |
Applies To
The property is applied to the following objects:
Property Value
The timeout, in milliseconds, to wait until the application is launched. The default value is 60000 ms (1 minute).
Example
The following example shows how to set the ClickOnce application wait timeout from scripts:
JavaScript, JScript
function Test()
{
var index = TestedApps.AddClickOnceApp("http://www.example.com/myapp/MyApp.application", "MyApp.exe");
var app = TestedApps.Items(index);
app.WaitTimeout = 60000; // launch timeout - 1 min (60000 ms)
app.Run();
// Test the application
...
app.Close();
}
Python
def Test():
index = TestedApps.AddClickOnceApp("http://www.example.com/myapp/MyApp.application", "MyApp.exe")
app = TestedApps.Items[index]
app.WaitTimeout = 60000 # launch timeout - 1 min (60000 ms)
app.Run()
# Test the application
# ...
app.Close()
VBScript
Sub Test
Dim index, app
index = TestedApps.AddClickOnceApp("http://www.example.com/myapp/MyApp.application", "MyApp.exe")
Set app = TestedApps.Items(index)
app.WaitTimeout = 60000 ' launch timeout - 1 min (60000 ms)
app.Run
' Test the application
...
app.Close
End Sub
DelphiScript
procedure Test;
var index, app;
begin
index := TestedApps.AddClickOnceApp('http://www.example.com/myapp/MyApp.application', 'MyApp.exe');
app := TestedApps.Items(index);
app.WaitTimeout := 60000; // launch timeout - 1 min (60000 ms)
app.Run;
// Test the application
...
app.Close;
end;
C++Script, C#Script
function Test()
{
var index = TestedApps["AddClickOnceApp"]("http://www.example.com/myapp/MyApp.application", "MyApp.exe");
var app = TestedApps["Items"](index);
app["WaitTimeout"] = 60000; // launch timeout - 1 min (60000 ms)
app["Run"]();
// Test the application
...
app["Close"]();
}
See Also
Testing ClickOnce Applications
StartupLink Property
ProcessToWait Property
Run Method