If you ever wanted to automate your tests on Windows Applications, then you should try the first release of Windows Application Driver (WinAppDriver) which is released on October 19th, 2017. It is a service with functionalities defined by Appium. You can test Universal Windows Platform (UWP) and Classic Windows Forms (Win32) apps on Windows 10 PCs.

If you have experience with Selenium then it will be very easy for you. FindElementById, FindElementByName, and FindElementByXPath are some of the locators to find UI element in the driver’s application session.

Let’s install and run our first sample.

Installing and Running Windows Application Driver

  • Download latest release of Windows Application Driver
  • Install the driver on a Windows machine where you want to run your application under test

  • Open Start menu, write “Use developer features” and press Enter. This command will open Settings window of Windows 10 for developers. We need to change the mode to Developer in order to run the driver.

  • Chose Developer mode. It will ask you to be sure. Click Yes,

  • After installation of Developer Mode package, open Start menu again and write “cmd” and press Enter to open Command Prompt.
  • Write “cd C:\Program Files (x86)\Windows Application Driver” and press Enter to go to the installation directory of the driver on command prompt.
  • When you are in the installation directory write “WinAppDriver.exe” and press Enter to run the driver with its default settings. The result must be like this;

It means that Windows Application Driver is running and listening on the default IP address and port 4723. Now we can run our samples.

Running Sample Tests for WinAppDriver

You can find sample test scenarios written in various programming languages in the same repository https://github.com/Microsoft/WinAppDriver/tree/master/Samples

Java Samples

  • Open the sample folder as an existing project in a Java IDE such as IntelliJ. For example: CalculatorTest
  • In the Java IDE build and run the test

C# Samples

  • Pull the repo and open CalculatorTest.sln under CalculatorTest
  • In Visual Studio 2015 with the test solution open to building the test and select Test > Run > All Tests

For more information about the samples and how to write your own test project please visit http://en.otomatikmuhendis.com