
Welcome to my course about UI automation and automated functional testing using WinAppDriver and C#.
In this course you will learn how to perform automated testing of all sorts of Windows applications.
My course is going to be helpful for both experienced professionals and newbies.
Prior to winappdriver or Windows Application Driver Microsoft Coded UI was the main UI automation tool sold by Microsoft.
The Coded UI is now deprecated and Microsoft is pushing ahead with WinAppDriver which is a free tool.
WinAppDriver is clearly the future of UI automation on Microsoft platform.
I am Naeem Akram Malik, I’ve been working as an Automation Engineer since 2009.
I’ve used many automated testing tools during the past decade.
This list includes CodedUI, Selenium, Postman, and many others.
The course is neatly divided in multiple sections.
All sections have a section introduction video.
All section introduction videos are available as a free preview, you may check them out after this video.
Let me brief you about various sections of this course so that you know what to expect. .
In the first section, I’ll show you what tools do you need to install for creating scripts using WInAppDriver and C# .Net.
Everything from Visual Studio to WinAppDriver.
Right after installations, we’ll get down to scripting.
I’ll show you how to get the title of an application, how to maximize a window, how to take screenshots and how to close an application.
You will be playing with UI automation scripts before the end of this section.
It will be really quick, trust me.
The second section will introduce you to WinAppDriver UI Recorder.
We’ll download the WAD UI recorder I’ll show you how to use it for finding various properties of UI elements.
This information will be used for clicking buttons, reading text values from data fields and typing text.
I’ll also show you how to use WebDriverWait in Windows applications to increase script reliability.
The next section will be dedicated to Visual Studio unit testing framework which is also known as MS Test.
I’ll show you the test explorer window and how test results are displayed when tests are executed.
I’ll also show you the lifecycle of an automated test.
In the next section I’ll show you how to combine MSTest with WinAppDriver for automated Ui testing.
I’ll show you how to perform a right click and select an item from the context menu and how to take a screenshot of entire desktop.
In the next section I’ll show you how to perform data driven testing to test same scenario with different data.
The last section will be dedicated to testing WinForms applications.
I’ll show you how to manipulate the most common UI controls like checkboxes and radio buttons.
More importantly I’ll show you how to handle combo boxes, menu items, sub menu items, tree views, and data grids.
I am a long time test automation engineer myself, that’s why my course is jam packed with practically useful information.
In the first section of this course we’re going to setup our development machine to create programs using WinAppDriver.
We’ll start by enabling Windows 10 DEVELOPER MODE
Then we’ll install Visual Studio Community Edition.
After that Node.JS and Appium.
Then we’ll take a brief look at the WinAppDriver GitHub repository.
We’ll download and install Windows Application Driver.
After I’ll show you how to create a new C# solution in Visual Studio and add a reference to Appium to communicate with WinAppDriver for performing various UI automation tasks.
After this I’ll show you how to launch a legacy win32 application using WinAppDriver.
We’ll use Notepad as an example.
I’ll show HOW to do some cool stuff to an application with WinAppDriver, I mean
how to retrieve application title
how to maximize application window
how to take a screenshot of the application window
how to close the application.
All of this will happen real quick, so buckle up for the ride.
In this video I am going to provide you an overview of the prerequisites of using Windows Application Driver.
I’ll also talk about tool installations needed for developing an automated test with Windows Application Driver.
We will also enable the Windows 10 developer mode in this section.
Windows Application Driver is also known as WinAppDriver.
Windows 10 is a mandatory requirement for running WinAppDriver.
WinApp Driver is based on Appium.
We will need to install Node.js to run Appium.
Windows Application Driver conforms to the standard WebDriver Specification and implements implements only the functionality specified in WebDriver specifications.
For writing C# .Net scripts, we will install Visual Studio Community Edition.
Your UI automation scripts will use http to communicate to an instance of a WinAppDriver.
WinAppDriver can be run in Windows 10 developer mode only. Let’s enable it before proceeding.
I’ll click the start button and click the settings icon
In the find textbox I’ll type “Developer” and hit enter
On the next screen, I’ll select the radio button “Developer Mode” and click the “Apply” button right underneath it.
That’s it, in the next video we’ll install Visual Studio .Net and other tools such as Node.js.
The first thing you need to install is a version of Microsoft Visual Studio IDE.
We will need the visual studio to write scripts in C#.Net programing language,, which we will use in this course.
IDE means integrated development environment.
Microsoft VS community edition is a free set of software development tools
You may use a higher version of Visual Studio if you have the license.
Otherwise, the Visual Studio community edition is sufficient for this course.
Visual Studio Community edition can be downloaded from the URL shown on the screen: https://visualstudio.microsoft.com/vs/community/
Let me show you how.
Once you download the VS community edition setup, run it and make sure you select the following options in the setup.
.Net desktop development
Nuget package manager
Testing tools
Windows API
After installing Visual Studio, you’ll need to install Node.js and Appium.
Node.js is a popular platform for building server-side applications. It is particularly useful for automation tasks, as it allows developers to write JavaScript code that can run outside a web browser. With Node.js, you can automate tasks like file handling, data processing, and network communication. This makes it a valuable tool for developers who want to streamline their workflows and reduce the manual work they need. Whether you are building a web application, a command-line tool, or a complex system, Node.js can help you automate many of the tasks required to get the job done.
How to download WinAppDriver from the Git Repository and install it. Windows Application Driver is the driver which works with the Appium client package to perform various operations on Windows application UI elements.
WinAppDriver is a tool used for automating Windows applications. It allows developers to test their applications by creating automated UI tests. This helps to ensure that the application is functioning properly and provides a high-quality user experience. WinAppDriver is an essential tool for developers who want to create robust and reliable applications.
In this video we are going to create a new solution in Visual Studio.
It will be our hello world of test automation.
We will add a reference to the Appium API.
I am show you how to launch the legacy application Notepad using WinAppDriver.
So,let me Open Visual Studio.
Click "Create a new project"
I will Select “Console App (.Net Framework)” from the new project dialog.
Please note that this is different from Console App .Net core.
Click Next button.
I’ll change the name to “RunNotepad”, leave everything else as it is and click the “Create” button.
Once the new project is created, expand the Solution Explorer.
Right click the references and select “Manage Nuget Packages”.
Click the “Browse” tab and search for Appium.WebDriver
We’re going to install this by clicking “Install” button.
Click OK on preview changes dialog.
When the installation is done, click the file Program.cs in solution explorer.
Let’s go to the main method
We are going to create an object of WindowsDriver with generic type WindowsElement.
WindowsDriver<WindowsElement> notepadSession;
I’m not going to assign it a value yet.
Since we haven’t included the namespaces, let me click the the WindowsDriver behind notepadSession object.
When a bulb will show up I will click it and select import namespace.
In order to run a legacy application, we must tell the WindowsDriver the full path of the exe file.
That is done using an object of DesiredCapabilities class.
DesiredCapabilities class is used for specifying the capabilities we desire to pre present in the application which we want to test with WinAppDriver.
Let’s define and instantiate that object.
OpenQA.Selenium.Remote.DesiredCapabilities appCapabilities =
new DesiredCapabilities();
Bring in the namespace and click save all button.
Now build the solution once.
This is the end of this video, we are going to learn more about launching notepad in next video. ;
WinAppDriver.exe is the heart of UI automation in Windows Application Driver based automation. It must be started first before you can run your automation scripts. In this video, I show multiple ways of launching WinAppDriver.exe. I also talk about what are common problems like wrong port number, port number blockage by Windows Firewall, and another software already using the port number.
This video you will learn how to run your WinAppDriver scripts without explicitly launching WinAppDriver.exe. You will learn how to use the AppiumServiceBuilder class. You will also learn how to use various methods of AppiumService for using a specific port and to use a log file for test run output.
This video is an introduction to WinAppDriver UI Recorder. Apart from definition of what is Windows Application Driver UI Recorder, this video also shows you how to download and run it. You will also learn how to find various properties of different application controls using WinAppDriver UI Recorder and use them in automated testing and UI automation for RPA.
How to type text in a UI Automation script using Appium WinAppDriver and C# .Net.
How to use Selenium/Appium implicit wait to slow down an Appium WinAppDriver test automation script written in C# .Net or any other programming language such as Java/Python.
When this course was created first, we relied solely on the WinAppDriver UI Recorder for inspecting various elements of Windows applications we’d be automating.
I recently came across another tool which we can use for looking into various application elements .
I’ve added this new section to the course to show you just that because I believe it has the potential to make your life easier.
This tool is called Appium Desktop.
You can download it from Appium’s website.
Before we proceed, please remember there are two prerequisites for using Appium Desktop.
One, you need to enable Developer Mode on your Windows 10 PC.
Two, you need to have WinAppDriver 1.1 or above installed on your PC.
Please note that you don’t need to install Node.js before this.
Let me google quickly Appium Desktop client and show you.
We are going to click the link titled “Appium desktop for OSX, Windows and Linux.
This will take us to the github repository of the Appium Desktop project.
You will need to download the Appium-windows.exe from here and use it to install Appium desktop.
Once you’ve got Appium Desktop installed, you can proceed to the next videos.
In the next video, we’ll start using Appium Desktop for inspecting Windows Applications.
Please note that you can use the same utility to inspect apps on other Appium supported platforms sucnh as Android and iOSas well, if you have proper tools installed.
Although that’s beyond the scope of this course.
See you in the next video.
Before we proceed with using Appium Desktop Client, please start the WinAppDriver.exe file.
Now let’s run Appium Desktop Client, you’ll be able to find it in your Windows applications.
Click the “Start” button and type Appium.
Now click the “Appium” icon and open the application. The Appium desktop client can take a few seconds to load.
On the main Appium UI, go to the “File” menu and select “New Session Window”
A new dialog box will open up.
The tab “Custom Server” will be selected.
I’ll leave the remote host and remote port fields unchanged.
In the Remote Path field is important here, I’m going to put a forward slash.
Then there’s this table like Ui to specify Desired Capabilities.
I am going to click on the first text box that contains the text “Name” and type the word app in there.
The word app will be small.
In the value textbox, I’ll paste the user mode ID of the calculator app.
I’ve shown you already how to find this value, otherwise you can download it from the resources section of this video.
Microsoft.WindowsCalculator_8wekyb3d8bbwe!App
If you notice, there’s a field “JSON Representation” on the right hand side of the UI. This is being computed based on the desired capabilities you are specifying.
Now Appium Client is going to connect the instance of WinAppDriver which is running on this PC and listening on port number 4723. Remember, we started it earlier.
I’ll press the button “Start Session”
The calculator app will start and you’ll get a preview inside the Appium UI inspector.
You can hover the mouse on various controls of the application under test and those controls will be highlighted in yellow.
Let’s end this video here and learn more about the Appium UI Inspector in the next video.
Once we have created a session in Appium Client we will be able to inspect various elements of the loaded application.
The UI is pretty simple.
There’s a row of button on the top, “Select Elements” is clicked by default.
Then we have the application preview loaded on one side, “App Source” in the middle showing the hierarchy of application controls.
The right most panel is “Selected Element”, it will populate when we’ll click an element.
In order to do so, we will hover the mouse on the application preview shown in the Appium Desktop Client.
You will see that the element under the cursor will highlight yellow.
Let’s click on the button two in the application preview. You see it’s color will change.
You’ll see all attributes of this Windows Element will load in the right hand side pane.
Same thing will happen if we click on the calculation results textbox on the top.
This is how you can use the Appium desktop client to inspect Windows applications.
Other options on this screen aren’t much useful.
You can now play with the inspector further to see more options.
I am going to close it now.
In the next video I’ll show you how to use the appArguments desired capability in Appium Desktop Client.
We can specify more additional capabilities using Appium Desktop Client.
This is something not available in WinAppDriver UI Recorder.
For example, if we want to open Notepad with a file loaded into it already.
Let us create a new session.
In the app default capability, I’ll put “Notepad”.
Then I’ll click the plus sign and add appArguments in the desired capabilities.
In the value field, I’ll put the path of the file which we want to open.
"C:\Users\Naeem\Desktop\bunch of text.txt"
I’ll click the “Start Session” button.
You’ll see that the file you specified as a parameter will open.
Same technique can be used with Excel to open a file right out of the gates.
There are some applications which show a splash screen when they launch.
The splash is mistakenly considered the main application window by the WinAppDriver and this leads to automation failure.
If you’re using WinAppDriver 1.2 RC, you can also make the WinAppDriver wait a little bit so that the splash goes away and then the WinAppDriver attaches to the application window.
For example, lets try a demo with Outlook.
I am going to launch it in straight forward way first of all.
I’ll create a new session window and I’ll put Outlook against “app” in desired capabilities.
You’ll see that the app preview will not load. The progress animation will keep spinning.
Let’s close the session window and come again.
This time, I’m going to add a new Desired Capability.
In the name field I’ll put ms:waitForAppLaunch
In the value field I’ll put the number 15.
Now I’ll click the “Start Session” button.
This time around you’ll see that the application preview will take a while to load in the Appium Desktop Client.
Now you can check all properties of the Windows Elements inside this application too.
This is the end of this video, I hope it was useful.
Cheatsheet of chapter 3 contains various useful information you may use later on.
Using Assertions to pass or fail Appium Test Automation with Ms Test and WinAppDriver in C# .Net.
Every automation test has got a life-cycle. It is true for all types of tests including unit test, integration test, and end to end (funciton/ui) test. The life-cycle is independent of the testing technology. Be it Appium or Selenium.
PDF file containing important shortcuts related to this section.
We are going to have some more fun with the Windows 10 Alarms application in this video.
Remember we created a solution using this application in the last section.
That solution can be downloaded from the downloads section of this lecture.
I’ve opened the solution.
The scenario we are going to automate is that we’re going to select the clock tab and add a new location to the clocks here.
Let’s add a new test method
[TestMethod]
public void VerifyNewClockCanBeAdded()
Next, we need to identify the controls.
I’ll minimize VS and open the clock application \and the UI recorder side by side.
Then I’ll first hover the mouse on the clocks icon which I want to click.
Now go back to the recorder and copy the value of “AutomationID” ID.
Let’s head back to the Visual Studio, find the control and click it.
sessionAlarms.FindElementByAccessibilityId("ClockButton").Click();
// let’s put a comment here about what this line does
Now for next step, Let’s find the properties of plus button and click it.
Let’s hover mouse on the plus button
It has name property "Add new clock"
Let’s click this button.
Now go back to the clocks application.
I’ll click the + button manually and a textbox will show up as a result.
It has an automation id value “TextBox”, not very helpful.
But, it’s name is unique. Let’s copy it and use it to find the control.
I’ll put the textbox object in a variable.
var txtLocation = sessionAlarms.FindElementByName("Enter a location");
We’ll send it a value from the keyboard,
txtLocation.SendKeys("Lahore, Pakistan");
And then, we’ll send an enter key on the same control.
txtLocation.SendKeys(Keys.Enter);
You’ll need to bring in the namespace for the Keys.Enter.
I already have the tile for Lahore, Pakistan. Let me delete it and close clocks application.
Now let’s run all the tests.
If they fail, don’t worry.
Add a small thread sleep call after clicking the first button.
System.Threading.Thread.Sleep(1000);
Delay tactics like these are every test engineers best friend.
A more sophisticated way to achieve the same is using WebDriverWait. We’ll cover it later on.
The WebDriverWait class is provided by Appium and Selenium to make it possible for our test scripts to wait until some condition is true.
For example, we might wait until the txtLocation is displayed.
Let’s head over to our code to the point where we called Thread.Sleep in previous video.
We’re going to create a new object of WebDriverWait here.
WebDriverWait waitForMe = new WebDriverWait();
Lets bring in the namespace.
The first parameter of this method will be the session object which we created earlier since it derives from IWebDriver
The second parameter will be a new instance of TimeSpan class.
WebDriverWait waitForMe = new WebDriverWait(sessionAlarms, new TimeSpan.Fromseconds(10));
To make it wait until a specific condition is true, we’ll call the method Until on this object.
waitForMe.Until(
This method takes a lambda expression as a parameter, which should evaluate to either true or false.
Such parameters are also called predicates.
We’ll put a name here and then equals greater than sign and then the condition which we want to evaluate using the supplied object.
waitForMe.Until(pred =>
txtLocation.Displayed);
Do take note of this technique, it can be a huge life saver.
You may now run the program to see what happens.
How to perform right click on a WindowsElement using Appium Actions class.
Demo of running an automated test in WinAppDriver, Appium, C#.Net.
How did we click the clock button?
sessionAlarms.FindElementByAcessibilityId(“ClockButton”).Click();
How did we click the + buttom?
sessionAlarms.FindElementByName(“Add new clock”).Click();
How to press enter key on a WindowsElement txtLocation?
txtLocation.SendKeys(Keys.Enter);
What is the namespace which we need to import to use keys?
OpenQA.Selenium;
What is a rudemntary way to make your scripts wait for something?
System.Threading.Thread.Sleep(1000):
Which WebDriver class is used to make scripts wait?
WebDriverWait
What is the namespace of WebDriverWait?
OpenQA.Selenium.Support.UI
How do we create an instance of WebDriverWait class?
WebDriverWait waitForMe = new WebDriverWait(sessionAlarms, TimeSpan.FromSeconds(10));
How do we call the Until method on WebDriverWait instance?
waitForMe.Until(pred => txtLocation.Displayed);
How do we find all elements in a session or under an element which contain same AutomationId?
sessionAlarms.FindElementsByAccessibilityId(“WorldClockItemGrid”);
How do we check if the text of a Windows Element starts with a specific value?
If(clockTile.Text.StartsWitn(“Lahore, Pakistan”)) {}
Which Appium class is used to perform right click?
Actions
How do we create an instance of Actions class?
Ations actionForRightClick = new Actions(sessionAlarms);
How do we move mouse to an element?
actionForRightClick.MoveToElement(objectOfWindowsElement);
What method is used to perform right click or context click?
actionForRightClick.ContextClick();
Which method of Actions class is used to perform the steps contained by the Actions object?
actionsRightClick.Perform();
How do we create a desktop or root session?
AppiumOptions optionsDesktop = new AppiumOptions);
optionsDesktop.AddAdditionalCapability(“app”, “Root”);
WindowsDriver<WindowsElement> sessionDesktop = new WindowsDriver<WindowsElement>(new Uri(“http://127.0.0.1:4723”), optionsDesktop);
How do we create an instance of WebDriverWait using desktop session?
WebDriverWait waitForMe = new WebDriverWait(sessionDesktop, TimeSpan.FromSeconds(10));
In order to access data available with a data driven test in MSTest, we need to use an object of TestContext class.
An object of test context class is supplied by the framework as a parameter to the ClassInitialize method.
We’re going to go to the class initialize method which we created earlier and save the value to a class level member.
Let’s do the assignment in the class initialize method.
objTestContext = testContext;
Now make the Visual Studio generate a field for us.
In the upcoming videos, we’re going to use this instance of objTestContext in our data driven test.
URL for downloading Ace Ole DB driver.
https://www.microsoft.com/en-pk/download/details.aspx?id=13255
Using Appium Windows Application Driver for test automation to click a checkbox WinForms elemebnt/control.
This video shows you how you can update an Appium 3 project to Appium 4. Which packages will be updated and how to fix errors.
A radio button is a close friend of CheckBox. But there are some differences as well. I show you how to write test automation code using WinAppDriver and Appium in C# .Net.
How to inspect a combo box with WAD UI Recorder to find useful properties. This information will be later on used for automated UI testing of a Windows WinForms .Net desktop application in Appium and C# .net.
Child items of a combo box include a button to click and open the combo. There's also a text area from where we can retrieve the text of a combo box. The same can be used to send keystrokes to select item or to click on the UI item with Appium WinAppDriver and C#.
Clicking a data grid in test automation can be complex. I show in this video how to retrieve various elements inside a grid control and how to click them using Appium WinAppDriver.
A Windows TreeView control is easy to automate with test automation. How to use Appium Actions class to find Windows user interface controls and find using Appium Find method calls to perform click operation and retrieve various attributes of the controls.
How to use UI automation to click on the OK button of an alert popup using Appium WinAppDriver, and C#. Two techniques are shown, one using XPath and other finding elements step by step.
In this video I show you how to click an item in a ListBox or a combo if the item is way down below and not being displayed initially.
I show you two techniques, one clicking the down button of the Windows list box control and the other pressing the down key on the ListBox(or combo) to make the non-displayed(hidden) element visible and then click it.
As you know Appium WinAppDriver can't operate on control if its displayed property is false
In order to select multiple items in a listbox, you'll have to hold down the Ctrl Key and then click mouse on multiple items.
This piece of code shows how to do just that.
How to retrieve the checked state of a checkbox?
check.Selected
What is the replacement of Appium 3 DeiredCapabilities class in Appium 4?
AppiumOptions
What is the replacement of method SetCability in Appium 4?
AddAdditionalCapability
How to retrieve the checked state of a checkbox?
radio.Selected
What are the two children of a combo box control?
1. A textbox
2. A button with ID = “Open”
Which control is displayed when the open button of a combo is clicked?
List
How are the items of a list reprsented by WinAppDriver?
ListItem with a Name property
Why aren’t list items visible without clicking the Open button?
Because their “Displayed” property is set to false.
Why aren’t list items visible without clicking the Open button?
Because their “Displayed” property is set to false.
Which method can be called on a ComboBox WindowsElement to set text easily?
SendKeys method with a value which is present in the combo box.
Which method can be called on a ComboBox WindowsElement to set text easily?
SendKeys method with a value which is present in the combo box.
How can we click the Open button of a WinForms combo box?
Combo.FindElementByName(“Open”);
After clicking the combo open button, how did we retrieve the list of combo items?
Combo.FindElementsByTagName(“ListItem”);
How to wait for a combo box child item to show up
WebDriverWait wdvCombo = new WebDriverWait(session, TimeSpan.FromSeconds(10));
Wdv.until(x => comboKid.Displayed);
What is the tag name of menu items?
MenuItem
How to get the value of any attribute of a WindowsElement?
Item.GetAttribute(“Name”);
What is the tag name of header cells in a grid?
Header
What is the tag name of cell items in a grid?
DataItem
Which property is used to access the text contents of a grid cell?
Text
Code for double clicking an element
Actions actsTree = new Actions(sessionWinForm);
actsTree.MoveToElement(nodeWorld);
actsTree.DoubleClick();
actsTree.Perform();
How can we click the contents of a grid cell if they’re not at the center?
Action.MoveToElement(cell, offsetXAxis, offsetYAxis);
This lecture shows you how to launch Microsoft Excel with WinAppDriver.
How to use appArguments with AddAdditionalCapabilitiy method call. I also show how to open a file with Excel.
In this video I show you how to use Excel data in a test in a non-series fashion.
You'll learn how to use the ExcelDataReader library and ExcelDataReader.DataSet extension for this purpose.
We are going to load in data from an Excel file.
How to utilize Newtonsoft JSON a.k.a JSON.Net in your Appium based test automation.
How to launch Excel using AppiumOptions?
appOptions.AddAdditionalCapability(“app”, “Excel”);
How to specify application arguments for launch time e.g. launch Excel without a splash screen
appOptions.AddAdditionalCapability(“appArguments”, “/e”);
How to open an Excel instance with a file loaded already
appOptions.AddAdditionalCapability(“appArguments”, “c:\filepath\filename.xlsx”);
How to both open Excel without a splash screen and load a file by default
appOptions.AddAdditionalCapability(“appArguments”, “/e c:\filepath\filename.xlsx”);
Code for opening an Excel file using ExcelReader
using (var stream = File.Open(@"C:\Users\Naeem\Desktop\TestConfigData.xlsx", FileMode.Open, FileAccess.Read))
{
using (var reader = ExcelReaderFactory.CreateReader(stream))
{
mTestData = reader.AsDataSet(
new ExcelDataSetConfiguration()
{
ConfigureDataTable = (tableReader) => new ExcelDataTableConfiguration()
{
UseHeaderRow = true
}
}
);
}
}
How to select a data row from a DataTable
Var returnRow = mTestData.Tables[tableName].Select($”DataKey=’dataKey’”);
The library used in this course to read JSON from file
Newtonsoft JSON.Net
URL of the website to verify the correct of JSON
Jsonformatter.org
Code to read data into a JObject from a text file and parse it.
JObject.Parse(File.ReadAllText(@”c:\path\file.json”));
A brief overview of the section about running Appium WinAppDriver based tests with vstest.console.exe. As a matter of fact, the same technique can be used to run CodedUI tests or simple unit tests.
In this video I show you how to run test automation without Visual Studio. We use the vstest.console.exe to run all automated tests present inside a test assembly(.dll). In our case these are Appium based WinAppDriver test automation scripts written in C# .Net. We use the Developer Command Prompt which comes with Visual Studio to launch these tests.
Test reports are a very important artifact produced by the test automation activity. In this video I will show you how to generate a test run report without any extra effort. We will generate a .trx file which stands for "Test Run" and x is I suppose extra or extension or execution maybe. But in any case you will learn how to generate a report which can be viewed in any version of Visual Studio.
You don't need to add additional reporting packages such as Extent reports or Allure. No additional code is needed to be added to your Appium WinAppDriver test automation scripts as well.
I show you some more options about running the test automation scripts. First of all how to see the list of all available tests inside a MSTest Appium WinAppDriver test assembly. Secondly how to run only one test from a file. Thirdly, how to run automated tests with a test name matching a pattern such as ~ListBox means run all automation scripts which have a name containing the word ListBox.
This is how you'll see we run our Appium WinAppDriver automated testing scripts written to test a WinForms ListBox control.
A dump of vstest.console.exe help through command prompt.
Cheatsheet document of this section for quick reference.
Sometimes you need to create a session with an existing application window. Although this scenario is documented on the GitHub page of WinAppDriver, it can still be challenging to implement it. That's why I decided to post the video here.
https://www.udemy.com/course/windows-ui-automation-on-azure-devops-build-pipelines/?referralCode=31F4FCC272434D3B1C3C
An introduction to my new course about running Windows UI Automation through AzureDevOps.
Welcome to an excellent automation testing tutorial for beginners.
What is WinAppDriver? Windows Application Driver (WinAppDriver) is a free test automation tool for testing Windows applications. Appium library uses WinAppDriver to perform automated operations on Windows desktop UI. Microsoft uses WinAppDriver for desktop application automation and functional software testing. This course is a WinAppDriver tutorial designed for everybody. Appium WinApp Driver is a free tool that provides APIs for many programming languages, including C# Dot Net, Java, and Python. The WinAppDriver is based on Appium, which was created by Selenium. Hence it is an industry-standard automation testing tool. Appium WinAppDriver is entirely compliant with WebDriver specifications(since it is based on Appium). Power Automate Desktop is not needed for Windows Application Driver test automation. Please note that WinAppDriver differs from AutoIt, and we don't need any familiarity with tools like AutoIt, Power Automate Desktop, PyWinAuto, or Robot Framework.
WinAppDriver UI Recorder Download and Usage is also explained completely in this course.
Automated testing is very helpful for software testing teams. Automated testing makes your software development lifecycle (SDLC) agile and quick.
If you're searching for a web app driver, please note that WinAppDriver is a different topic, and the web application driver is also another. Mostly it is Chrome Driver or Firefox Driver.
Windows Automation and Desktop Automation are at the heart of this course. In this course, you will learn about the free Windows application testing tool WinAppDriver and how to do Automation using WinAppDriver. You will also get example source code and step-by-step test automation examples. This course is about Appium WinAppDriver Windows Desktop UI Automation Testing in C# DotNet.
Automated testing is the way to go regarding desktop testing on Windows. Two popular tools for this are WinAppDriver and Appium. WinAppDriver is a Windows Application Driver that supports Selenium-like UI testing of Windows desktop applications. Appium, on the other hand, is a cross-platform mobile app automation tool that can also be used for desktop testing. WinAppDriver and Appium offer a powerful combination for automated desktop testing on Windows. These tools allow you to test your desktop applications for functionality, performance, and compatibility across different Windows versions and configurations. The best part is that you can automate the entire testing process, which saves you time and ensures consistent results.
WinAppDriver provides the following things to facilitate Automated Testing:
WinAppDriver is the software that can receive Appium commands and act as a UI remote control. WinAppDriver can perform different actions on the UI of a given Windows application for automation testing. It is possible to use WinAppDriver from any programming language, including but not limited to C#, Java, C++, JavaScript, and Python.
WinAppDriver UI Recorder is a lightweight UI inspection tool that allows you to find various properties of Windows UI elements.
API support for various programming languages, including C Sharp (C#), Java, Python, and many more, is available.
Many students of this course have used it to learn Windows UI Automation concepts and perform in Python and Java automation. In addition, they found it to be a great WinAppDriver tutorial series.
This course is a complete answer to your Windows automated software testing questions. In this course, I will show you how to get started using Appium WinAppDriver in C# and how to go full-throttle test automation quickly.
Note: Appium was created based on WebDriver, which is also the basis of Selenium; this way, if you start from Appium/WinAppDriver, you can quickly move forward to Selenium-based UI testing. Although, you will need to understand how DOM-based HTML websites work.
The best part is that this course is in C# Dot Net, and I will show you the techniques that work instead of typical open-source trial and error. For example, Appium-based Windows Application Driver (WinAppDriver) is a course for QA persons by QA persons.
Appium is very popular in the automated tester community for mobile Automation. Appium for iOS and Android is already out there; Microsoft has joined the bandwagon by providing the necessary tooling to bring Windows application testing into the Appium world.
I'll show you how to automate the testing of legacy Win32 Applications, deal with Unified Windows Platform (UWP) applications, and address its challenge to identify UI elements in C# (C Sharp) with WinAppDriver.
The first section covers tool installation in detail, and I'll show you how to download and install everything you need for test automation win WinAppDriver. This will include Visual Studio Community Edition, Node.js, Appium, and WinAppDriver.
Section 2 introduces the Windows Application Driver (WAD) UI Recorder. Once the tools are installed, you'll set up your first UI Automation solution in C# .Net and add Appium WinAppDriver. Next, you'll write your first test automation program using C# (C Sharp) and Appium WinAppDriver in the next 5 minutes. Finally, I'll show you how to take a screenshot using Appium WinAppDriver from C# code, read a Windows Win32 application title, maximize a window, and quit an application started by Appium WinAppDriver test automation scripts.
In section 2, I'll show you how to perform UI Automation operations such as mouse clicking and typing with the keyboard (SendKeys). Then, you'll learn how to use Selenium implicit wait using C# in Appium/WinAppDriver scenarios.
Appium Desktop Client is also covered; I will show you how to create a custom session in Appium Desktop Client to inspect elements of a Windows application through Windows Application Driver(WinAppDriver or WAD). You will also learn how to check the XML tree representing the UI elements of an application using Appium for test automation scripts.
Next, I'll introduce you to the MS Test (Visual Studio Unit Testing) Framework if you want to create a unit test project in Visual Studio. You'll practically see the life cycle of an MSTest-based unit test and implement it using keywords like TestClass, ClassInitialize, TestMethod, TestInitialize, TestCleanup, and ClassCleanup in C#. I'll also teach you how to see if your automated tests are passed or failed(the TDD red-green cycle); I'll show you the Visual Studio TestExplorer window for this purpose. You'll also learn how to see test failure error details. These general test automation concepts can be used in different languages and environments and with various test automation tools.
Please note that you can also use other automation frameworks like NUnit and XUnit, which are not shown in this WinAppDriver tutorial.
Afterward, I'll show you how to mix MS Test with (Appium) Windows Application Driver to create proper automated software testing scripts. In this section, I'll show you how to debug a test for identifying problems and devising solutions to complex problems (sometimes, you can't find a Windows Element beforehand). Finally, this section will provide helpful information about practical, functional UI testing using automated software tools.
I will show the MS Test's data-driven testing in the next section. Then, I'll show you how to incorporate Excel data in Appium Windows Application Driver tests. This section will show you how to run the same set of tests with different data for testing various scenarios. But first, I'll show you how to use TestContext in automation testing.
Appium C# WinAppDriver UI Automation Testing is the core focus of this course.
The last section of this course will be about automated testing of WinForms-based (Windows Forms) applications in WinAppDriver (Appium). I'll show you how to access the most commonly used Windows controls in RPA/UI Test Automation. WinForms Windows UI Elements (controls) related topics explicitly by this course are given below:
Checkbox test automation
Radio button test automation
Button test automation
DataGrid test automation
Popup automated testing
WinTree automated testing
Menu Item automated testing
In the end, I hope you will find this course helpful in learning automated software testing and UI Automation in general for RPA-like scenarios with Microsoft C#, Appium-based WinAppDriver, and Visual Studio.
This course uses entirely FREE SOFTWARE TOOLS!
Everything shown in this course can be run on Azure DevOps Pipelines through CI/CD.
Note: WinApp Driver is incorrect. The correct abbreviation is WinAppDriver, which is a single word. The full name is Windows Application Driver.
Desktop automation software testing is becoming increasingly popular among businesses of all sizes. This type of software testing allows companies to automate their testing processes, resulting in increased efficiency and accuracy. In addition, by using desktop automation software testing, businesses can streamline their testing efforts and ensure that their software functions correctly before it is released to customers. This can save companies both time and money in the long run, as they can identify and fix any issues before they become significant problems. Overall, desktop automation software testing is a valuable tool to help businesses improve their software development processes and deliver high-quality products to their customers.
Appium is an open-source automation tool that is used for testing mobile applications. It provides a cross-platform solution for automating iOS, Android, and Windows devices. With Appium, developers can write automated tests using their preferred language and test framework. It also supports a wide range of testing types, including functional, performance, and compatibility testing.
Are you a software tester looking to improve your skills and stay ahead in the industry? Join our test automation course and learn how to master automated testing. With our expert instructors and a comprehensive curriculum, you'll gain the knowledge and experience needed to excel in your career. Don't miss this opportunity to enhance your skills and increase your value as a software tester. Enroll now!
Test automation is essential; learn it now!