Run Method

Applies to TestComplete 15.47, last modified on January 20, 2023

Description

Use the Run method to launch a Windows Store application added to the Tested Applications collection in your project.

Declaration

WinStoreTestedAppObj.Run()

WinStoreTestedAppObj An expression, variable or parameter that specifies a reference to a WinStoreTestedApp object
Result A Process object

Applies To

The method is applied to the following object:

Result Value

A Process object that provides access to the specified application.

Example

The example below shows how to add a Windows Store application to the Tested Application collection and run the application.

JavaScript, JScript

function Test()
{
  // Adds a Windows Store application to the project
  var index = TestedApps.AddWinStoreApp("Microsoft.SDKSamples.Hilo.JS");
  var app = TestedApps.Items(index);

  // Launches the application
  app.Run();

  // Tests the application
  …
}

Python

def Test():
  # Adds a Windows Store application to the project
  index = TestedApps.AddWinStoreApp("Microsoft.SDKSamples.Hilo.JS")
  app = TestedApps.Items[index]
  
  # Launches the application
  app.Run()
  
  # Tests the application
  # ...

VBScript

Sub Test
  Dim index, app

  ' Adds a Windows Store application to the project
  index = TestedApps.AddWinStoreApp("Microsoft.SDKSamples.Hilo.JS")
  Set app = TestedApps.Items(index)

  ' Launches the application
  app.Run

  ' Tests the application
  …

End Sub

DelphiScript

procedure Test;
var index, app;
begin
  index := TestedApps.AddWinStoreApp('Microsoft.SDKSamples.Hilo.JS');
  app := TestedApps.Items(index);

  // Launches the application
  app.Run;

  // Tests the application
  …
end;

C++Script, C#Script

function Test()
{
  // Adds a Windows Store application to the project
  var index = TestedApps["AddWinStoreApp"]("Microsoft.SDKSamples.Hilo.JS");
  var app = TestedApps["Items"](index);
  // Launches the application
  app["Run"]();

  // Tests the application
  …
}

See Also

WinStoreTestedApp Object

Highlight search results