Mobile Profile

For your application you will need to configure a Mobile profile.

Here is an example for UWP application:

Here is the example for classic executable:

In both cases set deviceName=WindowsPC, platformName=Windows and automationName=Windows

In the case of UWP application you will need the application ID.

Getting AppUserModelId for UWP Application

Method 1: Use Get-AppxPackage in PowerShell
  1. Open PowerShell.

  2. Run the following command to list all installed UWP applications:

  3. Find the application you are looking for and note its PackageFullName.

  4. The AppUserModelId is typically in the format: PackageFamilyName!App

    For example:

    • PackageFamilyName: Microsoft.WindowsCalculator_8wekyb3d8bbwe
    • App ID: Microsoft.WindowsCalculator_8wekyb3d8bbwe!App
Method 2: Use AppxManifest.xml
  1. Navigate to the UWP app installation folder:

    • UWP apps are stored in C:\Program Files\WindowsApps.
  2. Find the folder matching the app's PackageFullName. For example, the Calculator app might be in:

    C:\Program Files\WindowsApps\Microsoft.WindowsCalculator_10.2112.10.0_x64__8wekyb3d8bbwe

  3. Open the AppxManifest.xml file in this folder. Look for the <Applications> section to find the app's entry.

  4. The Id attribute in <Application> will specify the app's ID, and the PackageFamilyName can be combined with this ID to form the AppUserModelId.

    Example: <Applications> <Application Id="App" Executable="Calculator.exe" EntryPoint="Windows.FullTrustApplication"> </Applications>

    AppUserModelId: Microsoft.WindowsCalculator_8wekyb3d8bbwe!App

Recording and Playback

Recording and playback looks same way as for Android and iOS applications, do it via Mobile Spy.

Appium API

You may also write tests using JavaScript Appium API.

AppiumDriver.ReconnectSession(false);

// Find number pad
var pad = AppiumDriver.FindElementByAccessibilityId("NumberPad");
if (!pad)
{
  return false;
}

// Click all buttons with digits and the decimal sign
var buttons = pad.FindElementsByXPath("//Button");
if (buttons == null || buttons.length == 0)
{
  return false;
}

for(var i = 0; i < buttons.length; i++)
{
  Tester.Message(buttons[i].GetText());
  buttons[i].Click();
}