QualityMate Sample Desktop
Last updated
Last updated
What does this guide cover?
Creation of a basic application using QualityMate on a desktop application.
The proper solution structure that you should use.
The QualityMate NuGets that you need.
A simple Page Object and application to run.
The completed sample solution described in this article can be downloaded here:
This guide assumes that you will use our asset application.
To create our first Application with QualityMate, we're going to:
Create a console C# project using the .Net Framework version 4.6.1 or higher and name it HelloWorldUiPlayer
. If you're working on Visual Studio, information on how to do this can be found here.
Create an Assets
folder inside the project folder.
Decompress the downloaded assets in the Assets
folder.
Set the assets files to copy to the output directory. To do this, open your project file (HelloWorldUiPlayer.csproj
) and add the following lines:
Add the Mobilize.QualityMate.UiPlayer
package through the NuGet package manager.
The project folder structure should look like the following example:
It's time to create our first Page Object; we're going to do the following:
Create a folder named PageObjects
inside the project folder.
Create a C# class file namedForm1.cs
inside the PageObjets
folder.
Add the following usings in the Form1.cs
file:
Create the UI controls that we are going to use on Form1
class like the following:
The fields specified in the code snip above represent each UI control of the assets' application.
Once we have a PageObject, we can create a new QualityMate script:
Create a HelloWorld.cs
file inside the application
folder.
Add the following using statements in the HelloWorld.cs
file:
Create the class HelloWorld
that will contain our execution script.
Create a UiPlayerConfiguration
property that will hold the UiPlayer parameters.
Create the method HelloWorldScript(UiExecutionController controller)
, this method will let us interact with the UI using the controller with the next code:
Create the method ExecuteHelloWorld()
, we're going to use this method to start the UiPlayer like the following example:
On the Main()
function create a new HelloWorld
object to call the method ExecuteHelloWorld
Finally, launch the application and see the magic happen. Great isn't it?