TestedApps.AddWinStoreApp Method

Applies to TestComplete 14.70, last modified on April 22, 2021

Description

The TestedApps.AddWinStoreApp method adds the specified Windows Store application installed on your computer to the list of tested applications and returns the zero-based index of the application in the application list.

Declaration

TestedApps.AddWinStoreApp(AppName)

AppName [in]    Required    String    
Result Integer

Applies To

The method is applied to the following object:

Parameters

The method has the following parameter:

AppName

The name of the application package as it is specified in the package manifest.

Result Value

The zero-based index of the application in the list of tested applications. You can use this index to access the corresponding WinStoreTestedApp object using the TestedApps.Items(Index) property.

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

TestedApps Object
WinStoreTestedApp Object
Add Method
Adding Windows Store Applications to the List of Tested Applications

Highlight search results