Windows Application Driver is a Product of Microsoft (WinAppDriver). It is a service to support Selenium-like UI Test Automation on Windows Applications.It support automation and testing Windows Forms,Universal Windows Platform(UWP),Windows Presentation Foundation(WPF) and Classic Windows(Win32) apps on windows 10 PCs.

Set up required for this:-

  1. WinAppDriver.exe

2. Visual Studio 2013+

3. Windows 10 PC

4. inspect.exe for identifying elements on desktop apps

5. desktop application to automate.

6. Developer mode should be ON in your PC.

Installation and Running

1.Download and Install latest  WinAppDriver.exe from below link

Click here to download (Prefer latest version).

2.After installation, Run WinAppDriver.exe from the installation directory in administrator mode to  listen to  default IP address and port (E.g. C:\Program Files (x86)\Windows Application Driver).

127.0.0.0:4723

It can be configured to listen to a different IP Address and port as follows.

WinAppDriver.exe 4727
  WinAppDriver.exe 10.0.0.10 4725
  WinAppDriver.exe 10.0.0.10 4723/wd/hub

Steps to follow

1.Create an empty Console application (.Net Framework/.Net Core).

2. After Project creation, Install  Microsoft.WinAppdriver.Appium.WebDriver from NuGet Package Manager. we use this package to communicate with the WinAppDriver Server.

3.The application we are going to automate is a simple Windows Forms application with basic controls.

4.To find elements in the application we need to install inspect.exe.

For inspect.exe --> download from here

5.Open Program.cs file and paste the below code.

In the above Code, FormId can be a executable file path/ AUMID (Application User Model Id).

For finding AUMID of an application please refer this link find-aumid

6. Supported Locators

7.Run inspect.exe and our application which is under test to find elements using inspect.exe.

8.Run our application,It will create five instances of our testing application and fill up the text boxes accordingly.

Conclusion:

WinAppDriver is a great open-source tool from the makers of the Microsoft. With support for different scripting languages and easy integration with Selenium and Appium. For more information on WinAppDriver click here

Hope this article helped you in gaining some basic knowledge on WinAppDriver.

Thank you.