Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between using System.Windows.Automation and Microsoft.VisualStudio.TestTools.UITesting for WPF UI Test automation?

What is the difference between using System.Windows.Automation (commonly known as UIA) API and Microsoft.VisualStudio.TestTools.UITesting (one that is used in Coded UI Test behind the scene) for implementing UI Test automation of a WPF application programatically?

Is there any specific scenarios, restrictions or advantages/disadvantages?

like image 659
atiyar Avatar asked Apr 11 '11 11:04

atiyar


People also ask

Which is the best tool for UI automation?

Selenium is a well-known open-source UI test automation tool widely utilized in the testing industry. It can automate test scripts on various operating systems, including Linux, Mac, Windows, and browsers, including Chrome, Firefox, Internet Explorer, and Headless Browsers.

What is WPF in automation?

Automation Expert. Windows Presentation Foundation (WPF) is a common framework used by developers to build applications for a Windows Operating System (OS).

What is Microsoft automation framework?

Microsoft UI Automation is an accessibility framework for Microsoft Windows. It addresses the needs of assistive technology products and automated test frameworks by providing programmatic access to information about the user interface (UI).

What is coded UI automation Tool?

Coded UI (also called CUIT) is an automation testing tool provided by Microsoft technologies which helps in creating automated tests. The Coded UI tests help us verify the whole application such as User Interface and their functioning properties.


2 Answers

Coded UI Tests are a framework which wraps many automation technologies. UIA is just one of them.

UIA is new in Vista/Windows 7 and it targets rich client apps, coded UI tests will use UIA when you write tests against WPF and Silverlight.

The advantage of Coded UI over using UIA directly is a lot of automatic retrys and knowledge of how UIA works is built into Coded UI tests.

like image 78
Jake Ginnivan Avatar answered Sep 23 '22 13:09

Jake Ginnivan


In fact, the answer is in your question. UIA is used for automation, while UITesting is used for... testing.

An excerpt from MSDN:

UI Automation provides programmatic access to most user interface (UI) elements on the desktop, enabling assistive technology products such as screen readers to provide information about the UI to end users and to manipulate the UI by means other than standard input. UI Automation also allows automated test scripts to interact with the UI.

Thus, UIA can be used for - but isn't limited to - UITesting.

like image 26
Henk van Dijken Avatar answered Sep 19 '22 13:09

Henk van Dijken