Pre-requisites for Desktop AutomationInstallation guide for C# WinAppDriver

Installation guide for C# WinAppDriver Framework

Install WinAppDriver, .NET SDK, and Visual Studio with the required workloads to automate Windows desktop applications with C# WinAppDriver.

Installation Steps for WinAppDriver

  1. Download Windows Application Driver installer from https://github.com/Microsoft/WinAppDriver/releases
  2. Run the installer on a Windows 10 machine where your application under test is installed and will be tested
  3. Enable Developer Mode in Windows settings
  4. Run WinAppDriver.exe from the installation directory (E.g. C:\Program Files (x86)\Windows Application Driver).
  5. Windows Application Driver will then be running on the test machine listening to requests on the default IP address and port (127.0.0.1:4723).

Steps to Install .NET

To install .NET, perform the following:

  1. To download .NET version 9, click here.
  2. Click the Direct link. It will take some time to download required files before the installation.
    Visual Studio downloads page with the Direct link for the .NET version 9 SDK
  3. Once the SDK file has been downloaded, open it from your Downloads folder by clicking the file.
  4. The installer pop-up will appear. Click Install to begin the installation process.
    Downloaded .NET SDK installer file shown in the Downloads folder
  5. You can view the setup progress as the installation is in progress.
    .NET SDK installer pop-up with the Install button
  6. The installation completed pop-up will appear, displaying the list of products that were successfully installed.
    .NET SDK setup showing installation progress

Steps to Install Visual Studio

C#-WinAppDriver.exe, the latest version, is compatible with Visual Studio versions 2017 and above. These tools work together to support the automation of Windows desktop applications using C# and Visual Studio as the development environment.

To install Visual Studio, perform the following:

  1. To download the Visual Studio community version, click here.
  2. Run the setup file. It will take some time to download required files before the installation.

Make sure to select the following workloads before proceeding with the installation.

Windows

Visual Studio Workloads screen with .NET desktop development and Universal Windows Platform checked
  • .NET desktop development
  • Universal Windows Platform development

Web & Cloud

Visual Studio Installer Workloads tab with ASP.NET and web development checkbox checked
Visual Studio Installer Workloads tab with Data storage and Office/SharePoint development checked
  • ASP.NET and web development
  • Data storage and processing
  • Office/SharePoint development

Other ToolSets

Visual Studio installer Other Toolsets list with .NET Core cross-platform development checked
  • Visual Studio extension development
  • .NET Core cross-platform development