WinStoreTestedApp Object

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

Description

The WinStoreTestedApp object corresponds to a Windows Store application in the project’s Tested Applications collection. Use the object to get and edit the application information, such as the application’s package name, and to launch the application from tests.

To get the WinStoreTestedApp object corresponding to a specific Windows Store application added to your project:

  • TestedApps.AppName, where AppName is the name, set for your application in the Tested Applications collection.

  • TestedApps.Items(Index), where Index is a zero-based index of the application in the Tested Applications collection.

Members

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

Testing Windows Store Applications
About Tested Applications

Highlight search results