Skip to main content

Set desired capabilities in Windows desktop app testing

note
  • Starting from Katalon Studio 10.3.0, Windows Desktop app testing is available again as a beta feature. It supports spy, record, and execution of basic test cases using a new built-in driver based on the FlaUI library, replacing WinAppDriver. No separate installation is required.
  • If you are using earlier 10.x versions of Katalon Studio, Windows Desktop app testing remains unavailable due to incompatibility with the W3C WebDriver protocol. To access the legacy WinAppDriver-based functionality, use Katalon Studio 9.x. For details, refer to the Katalon Studio Release Notes: Version 10.x.

This article shows you how to configure desired capabilities for Windows Desktop Application testing.

  1. Go to Project > Settings > Desired Capabilities > Windows to open the Windows desired capabilities settings.

    Alternatively, start your Windows Recorder/Spy or Native Windows Recorder session. In the Configuration field, click Edit.

  2. In WinAppDriver URL, enter the URL to the WinAppDriver server following this format: http://<ip-address>:<port>. By default, Katalon Studio is set to http://127.0.0.1:4723.
  3. In the table below, click (+) Add to add desired capabilities.
    Katalon Studio supports the same capabilities as WinAppDriver does. To learn more about the supported capabilities, refer to this WinAppDriver document: WinAppDriver supported capabilities.
    Note:

    Katalon only supports appArguments and appWorkingDir capabilities in Native Windows Recorder:

    • appArguments: Support passing arguments to the AUT. You can also use this desired capabilities to record action without opening a Windows.
    • appWorkingDir: Specify the Application Under Test working directory.

Set up Desired Capabilities in Katalon Studio 10.3.0

Katalon Studio 10.3.0 introduces a new built-in Windows driver that follows the W3C WebDriver specification. As a result, all non-standard desired capabilities must now include the appium: namespace prefix.

If you previously defined custom capabilities in Project Settings > Desired Capabilities > Windows, update them as follows:

Legacy CapabilityUpdated Format
appWorkingDirappium:appWorkingDir
appArgumentsappium:appArguments

To update:

  1. Go to Project > Settings > Desired Capabilities > Windows.
  2. Update any non-standard capabilities by adding the appium: prefix.
  3. Click Apply and Close to save your changes.
Notes
  • You only need to update the desired capabilities once per project.
  • The capability ms:waitForAppLaunch is no longer supported.
  • Use the built-in keyword Windows.delay(<numberOfSeconds>) to pause test execution and wait for the application to launch.

Use cases

Example 1: Set delaying time for an app launch

The following example shows you how to set desired capabilities to wait for a defined amount of time before launching an application.

Important:
  • Download and install WinAppDriver version 1.2 onwards. You can refer to this document to install WinAppDriver: Set up WinAppDriver.
  • Appium version 1.16.0 onwards to support WinAppDriver.

Go to the desired capabilities settings, click Add, then input the following value:

NameTypeValue
ms:waitForAppLaunchstring25(*)

(*) This means delaying the app launch for 25 seconds. The maximum is 50 seconds.

Delay app launch

Example 2: Use desired capabilities with Native Windows Recorder

The following example shows you how to set desired capabilities in Native Windows Recorder.

Open the Native Windows Recorder session dialog, in the Configuration field, click Edit.

Click (+) Add and input the following values:

NameTypeValue
appWorkingDirStringC:\User**user_name**\Desktop\workspace\katalon
appArgumentsString--arg1 --arg2

Was this page helpful?