WinAppDriver Alternatives for Apps With No Accessibility Tree

Looking for a WinAppDriver alternative?Learn how Windows desktop test automation works, and how to test apps with no accessibility tree by sight, without code.

11 min readBy the GUI Test Studio team

When the test tool cannot see your app

You point Inspect at your application's Save button, and it shows one blank pane.Your locator finds nothing, the WinAppDriver test fails, and the search for a WinAppDriver alternative begins.

This guide explains how Windows desktop test automation works, which applications it cannot see, and how to test such a Windows desktop application anyway: by finding every element by sight, the way a person does.

How does Windows desktop test automation work?

Definition

Desktop test automation is software that drives an application through its interface, the way a tester would, and checks what it shows.

  • On Windows, almost all of it goes through Microsoft UI Automation, the accessibility framework that also feeds screen readers.

Each application describes its interface to Windows as a tree.The window holds panes, and the panes hold buttons, fields and lists, each with a name, a type and a place on the screen.Microsoft Active Accessibility, or MSAA, is the older technology that does the same for older programs.

Standard controls

Win32 · WinForms · WPF

WindowOrders
Pane
EditCustomerAutomationId: CustomerBox
ListOrder linesAutomationId: LinesList
ButtonSaveAutomationId: SaveButton

Custom-drawn controls

Painted by the app itself

WindowOrders
Pane
Nothing inside: the Save button is a picture, not an element
On the left, a tool finds the Save button by its AutomationId.On the right, there is nothing to find.

Read the tree

The app describes its window

Find by locator

An AutomationId, a name, an XPath

Act

Click, type, select

Assert

Read a value back from the tree

A test tool reads that tree, finds an element with a locator such as its AutomationId, its name or an XPath through the tree, then clicks it, types into it or reads its value.

This works well when the tree is complete.Microsoft ships the description of every standard Win32, Windows Forms (WinForms) and WPF control, so those appear in the tree by themselves.A custom control is different: its developers must write that description, and without it, Microsoft's documentation says the control is largely opaque to UI Automation, which can report little more than its location.

WinAppDriver and its alternatives read the same tree

WinAppDriver, Microsoft's Windows Application Driver, brought Selenium-like automation to UWP, Windows Forms, WPF and classic Win32 apps.Its last stable release on GitHub, version 1.2.1, dates from November 2020, followed by a 1.3 release candidate in July 2021.The Appium Windows driver built on top of it is now marked deprecated, and its documentation names the Appium WinCore driver as the official replacement.

WinAppDriver

November 2020

Version 1.2.1, the last stable release

July 2021

A 1.3 release candidate

Today

The Appium Windows driver built on it is deprecated: its replacement is the Appium WinCore driver

The usual alternatives each take a different road to the same tree:

Appium WinCore and NovaWindows are Appium drivers that work on UI Automation's elements, from a test written in any language Appium supports.
FlaUI is an open-source .NET library that wraps Microsoft's UI Automation libraries for tests written in C#.
pywinauto is an open-source Python library with two back ends: the Win32 API and UI Automation.
Coded UI, Visual Studio's own UI test framework, is deprecated: Visual Studio 2019 is the last version that creates tests with it.
TestComplete and Ranorex are commercial tools that identify controls by their properties, and both offer image-based automation for the controls they cannot recognize.

Even Microsoft's newest guidance for WinUI 3 apps, the winapp ui commands for AI agents, reads the live accessibility tree and asks developers to set an AutomationId on every interactive control.

For the web testing tools side by side, see the comparison study.

Which Windows apps have no accessibility tree?

Point Inspect at any of these, and you will often find one blank pane where you expected a form.This is the daily reality of legacy application testing, and of many modern apps too.

Kind of applicationWhat a tree-based tool usually finds
Custom-drawn controls: a grid, a ribbon, a gauge the app paints itselfOne rectangle, unless its developers wrote its accessibility
Delphi (VCL) and Visual Basic 6 programsLabels and buttons drawn without a window of their own, and grids that hide their cells behind placeholder names
MFC programs with owner-drawn controlsButtons and lists the program paints itself, often with no name or text
Java Swing and AWT applicationsNothing useful until the Java Access Bridge is turned on, and it is off by default
Games, 3D viewers, canvases, charts and mapsOne window that holds a picture
Citrix, Remote Desktop and VMware Horizon sessionsOne window of pixels on your computer
Apps inside a virtual machineThe virtual machine's window, with nothing inside
Electron apps built without accessible namesElements with no name to find them by
Business platforms that draw their forms by handThe form's own window, and nothing in it

Sometimes the tree exists, but you may not touch the application: a program from another vendor, a build locked down for an audit, a team that cannot add AutomationIds for you.Any tool that needs a test build, an agent inside the app or a change to its code is then out of reach.

How to check your own app in two minutes

  1. 1

    Open an inspection tool

    Install Accessibility Insights for Windows, Microsoft's inspection tool, or use Inspect from the Windows SDK.

  2. 2

    Hover over the elements your tests need

    Each one should appear with a name, a type and an AutomationId.

  3. 3

    Read what you see

    One pane for the whole window, or elements with no name, means a tree-based tool cannot find them reliably.

Image-based testing: test what is on the screen

Definition

Image-based testing is test automation that finds elements by how they look on the screen, not by what the application says about them.

  • It is how desktop test automation works without accessibility information.
  • It needs nothing from the application: no tree, no locator, no change to its code.

If you can see an element, a test can reach it.

Find by sight

On the real screen, in a search area

Act for real

Real mouse and keyboard input

Read the words

The text as the screen shows it

Check what is shown

Against what you expect

SikuliX is the classic open-source example: you capture a picture of each element and write each step as a line of script.Commercial tools offer it as a fallback.TestComplete's documentation, for instance, says its image-based tests can be recorded only on Android apps: on a desktop app, you capture the images and add the test commands by hand.

Done naively, a test by sight has well-known weak spots.Each one has an answer:

The weak spotWhat answers it
A window that movedA search that widens to the whole screen when the element is not where it was
Clicks recorded at fixed coordinatesEach click aimed at where its element stands now
Several identical buttonsA search area around each element, so look-alikes are told apart by where they stand
A shade lighter, a softer edgeA comparison that ignores rendering noise and still fails on a real difference a person would see
Pictures captured by handA recording that cuts every picture for you
A different screen size or scalingRecording on the screen size and scaling the tests run on

A WinAppDriver alternative that needs no tree

GUI Test Studio is an end-to-end GUI testing suite for Windows that tests any application you can see on your screen, without code.It does not choose between the tree and the screen.

A recorded click

Does the app describe the element?

YesThe test keeps its description and its picture: the run asks the app first.
No, one blank paneThe picture alone finds the element, by sight.

Either way, the check compares what it found with the picture you recorded.

How GUI Test Studio finds elements explains how the two ways work together.Here is what it means for an app with no tree, step by step.

  1. 1

    Record the app

    In GUI Test Runner-Recorder, click Record and pick An app.Choose the program among the open apps, or browse to one that is not running yet.Tick the box that starts it with the test and closes it at the end, so every run starts from a fresh app.Then use the app as you always do.

    The whole screen is always recorded.An app only decides where automatic checks come from.

    Choosing an app keeps a notification from another program out of your test, while every click and key you make is still recorded.See Record a test.

  2. 2

    Every element is kept two ways

    Each click gets a Visual Assert just before it: a picture of the element, its visual target.When the application describes that element to Windows, the test keeps that description too.When the app answers with one blank pane, there is nothing worth keeping, and the picture alone finds the element.

    Some programs draw their forms by hand and only describe the form's own window.The test keeps that window, so a form that moved is found again where it now stands.

  3. 3

    Check what is shown

    A Visual Assert checks that an element is on the screen and looks right.A Text Assert asks the application what an element says, and reads the words on the screen when the application cannot tell.A Dynamic Text Assert checks a value that changes on every run, such as a date or an order number, by its shape.

    Each comparison ignores the small rendering differences every screen has and still catches the real regressions a person would call a change: a wrong color, a missing icon, a word that changed.See Visual checks.

  4. 4

    Run it, wherever the window opens

    The test replays your clicks and keys as real mouse and keyboard input, aimed at where each element is now.When a check has not found its element in its Search Scope after a second, it looks over the whole screen too, so a window that moved does not fail the test.The Confidence Report then says the element was found outside its Search Scope, and offers to widen it in GUI Test Studio.

    On a computer with several monitors, a test uses one screen or all of them, and remembers which.

    An example run: the Confidence Report lights up what changed and says it in plain words.

Citrix, Remote Desktop and virtual machines

A Citrix, Remote Desktop (RDP) or VMware Horizon session reaches your computer as one window of pixels.Some tools can reach its controls only when they are installed on the remote server itself, as SmartBear describes for TestComplete.GUI Test Studio tests the session from the computer that shows it, by sight, like any other window.

Pick An app and the session's window when you record, or An area of the screen for one panel of it.An app in a virtual machine works the same way: give the virtual machine a fixed window size, the same on every computer that runs the tests.See What you can test.

ExampleAn order-entry app over Remote Desktop

A Delphi order-entry program runs on a server, and your testers reach it through Remote Desktop.You record one order in the session's window.Each click gets its Visual Assert, and you add a Text Assert that waits for "Order saved".

On the next run, the session opens further to the right.Every check finds its element there, and every click follows it.

Run desktop tests on every build

gtr-cli, the command-line runner, runs a test exactly like the Run Test button.It adds what a pipeline needs: an exit code, a JUnit file, and every piece of evidence of a failure in one folder.

Command
gtr-cli run tests --countdown 0 --junit results\junit.xml --artifacts results\artifacts

A desktop test replays on a real screen, so the build agent needs an unlocked Windows desktop session.A virtual machine with a fixed screen size works well as a test agent.The CI/CD guide sets it up step by step.

Questions

What can I use instead of WinAppDriver?

For an application with a complete accessibility tree, the Appium WinCore and NovaWindows drivers, FlaUI and pywinauto read Windows UI Automation from code.For an application with no tree, or to test without code, use a tool that finds elements by sight, such as GUI Test Studio, which also asks the tree first when there is one.

Is WinAppDriver still maintained?

Its last stable release on GitHub is version 1.2.1, from November 2020, followed by a 1.3 release candidate in July 2021.The Appium project's documentation says the WinAppDriver server has not been maintained by Microsoft for years, and names the Appium WinCore driver as the official replacement for its own Windows driver.

How do you test an application that has no accessibility tree?

Test it by sight: find each element on the real screen by how it looks, act with real mouse and keyboard input, read the words on the screen and compare what is shown with what you expect.GUI Test Studio builds all of this from a recording, so there is no picture to capture by hand and no script to write.

Can I automate tests of an app in a Citrix or Remote Desktop session?

Yes, from the computer that shows the session.The session reaches that computer as one window of pixels, so the test finds its elements by sight, like in any other window, with nothing installed on the remote server.

Does image-based testing break when the window moves?

Not when it is done well.GUI Test Studio aims every click at where its element is now, and a check that does not find its element in its Search Scope after a second looks over the whole screen too, so a window that moved does not fail the test.

Does GUI Test Studio also work with WPF and Windows Forms apps?

Yes.When an application describes its interface to Windows, as WPF and Windows Forms apps do, the GTS Engine + AI asks it first and keeps that description with each check.The picture is kept as well, so the test still finds the element if the application's answer ever falls short.

WinAppDriver, Windows, Visual Studio, Selenium, Appium, FlaUI, pywinauto, TestComplete, Ranorex, SikuliX, Delphi, Java, Citrix, VMware Horizon and Electron are trademarks of their respective owners.

Ready to record your first test?

Every feature, for 15 days.

Rather see it on the kind of app you test?Book a free 30-minute call with our team.

Book a demo