🖋️
QualityMate
  • QualityMate
  • Getting Started
    • Introduction
    • Why QualityMate
    • Architecture
    • Supported Web Browsers
    • Glossary
  • Components
    • UI Player
      • Basic Concepts
      • UiPlayer
      • MSTest Integration
      • Samples
        • QualityMate Sample Desktop
        • QualityMate Sample Web
        • QualityMate MSTest Integration Sample Desktop
        • QualityMate MSTest Integration Sample Web
        • QualityMate Integration with Test Frameworks
        • Web Authentication Sample
      • QualityMate Project Template
    • UI Recorder
      • Basic Concepts
      • Setting Up the Recorder
      • Validating an Element
      • Generating QualityMate Solution
  • Tools
    • File Comparators
    • Image Processor
    • Project Merger
    • Test Case Generator
      • Filters
      • Rename Recorded Controls
  • Basic Concepts
    • Page Object
      • Work Guide
    • Controls
      • Control Types
        • Generic Types
        • Desktop types
        • Web Types
        • WebMap types
          • Kendo PowerBuilder
          • Kendo WinForms
          • Kendo Silverlight
      • Interactions
        • SendKeys
        • Validate
    • Selectors
      • Selectors in Code
      • Default Selector
      • Shared Selector
      • Selectors Category
        • CSS Selector
        • XPath Selector
        • Image Selector
        • Frame Selector
      • Identifying Selector
        • Identify for Windows Desktop
        • Identify for Web
  • How to Guides
    • Setting Up the Configuration
      • Parameters
      • Context
      • Loading External Data
    • Awaiting for the Application
      • Busy Loaders
      • Retries
    • Defining Controls
      • Extending Controls
      • Control Slice
      • Control Collection
    • Logging on Tests
      • QualityMate Reports
      • Logging
  • Help
    • Best Practices
      • Environment
      • Tests
      • Page Objects
      • Validations
      • Interactions
      • Image Comparisons
    • Known Issues
    • Continuous Integration
      • Agents Session
    • Upgrading QualityMate
      • From version 7 to version 8
      • Previous Versions
      • How to switch from TestFeature to UiTest
    • VS Test
      • Command Line
      • Generate Reports
  • API
    • Control Interfaces
      • IButton
      • ICheckBox
      • IComboBox
      • IControl
      • IControlSlice
      • IDateTimePicker
      • IElement
      • IGrid
      • IGroupBox
      • ILabel
      • IListBox
      • IMenu
      • INumericUpDown
      • IPageObject
      • IProgressBar
      • IRadioButton
      • IRadioButtonGroup
      • ISplitButton
      • IStatusStrip
      • ITab
      • ITextBox
      • IToggleButton
      • IToolBar
      • ITreeView
    • Behavior
      • ICheckableControl
      • IList
      • ITextControl
    • Enums
      • ClickType
      • KeyModifiers
      • MouseButton
  • Changelog
    • Changelog
      • Version 8
      • Version 7
      • Version 6
      • Version 5
      • Version 4
      • Version 3
Powered by GitBook
On this page
  • Execute
  • UIPlayerConfiguration
  • UIExecutionController
  • UIExecutionResult
  • Code example
  • How to use UiPlayer?

Was this helpful?

  1. Components
  2. UI Player

UiPlayer

PreviousBasic ConceptsNextMSTest Integration

Last updated 3 years ago

Was this helpful?

The UiPlayer is a class, the automation engine responsible for reproducing user-interactions with an application with a user interface.

Execute

The way to tell QualityMate to perform the wanted steps is through the Execute method. This receives the UIPlayerConfiguration and an containing the steps.

UIPlayerConfiguration

Contains the parameters that allow you to change the default behavior of QualityMate, such as the ExecutionTimeout or the StepTimeout. The complete list of parameters is .

UIExecutionController

The with the steps to be performed must receive the UIExecutionController. With it, you can interact with QualityMate and request PageObjects using the GetPageObject for example.

These are the exposed methods:

Method
Summary

Validate

Validates the given operation until it returns true or times out.

GetPageObject

Gets the PageObject specified.

TakeScreenshot

Take a screenshot.

Log

Logs a message to the log file.

Dispose

Cleanup the object.

These are the exposed properties:

Property
Summary

Configuration

Gets the Configuration Manager of the current execution.

ResultsPath

The location where the log, screenshot, or video are stored.

LogFilePath

The log file location.

VideoFilePath

The video file location.

WebManager

The manager used to interact with the browser.

UIExecutionResult

After performing the steps, Execute returns a UIExecutionResult. It contains whether it was successful or not, and any Exception thrown during execution.

These are the exposed properties:

Property
Summary

LogFilePath

The log file location.

ScreenshotFilePath

The screenshot file location.

VideoFilePath

The video file location.

Success

Indicates whether the execution has been completed successfully.

Exception

Stores the exception if it is thrown during the execution.

Code example

public void Run()
{
    UiPlayerConfiguration configuration = new UiPlayerConfiguration()
    {
        Technology = Technology.Desktop
    };

    // Here we pass the configuration and the Action with the steps to be performed.
    UiExecutionResult result = UiPlayer.Instance.Execute(configuration, this.ExecuteSteps);

    // After finishing the execution we can check the result.
    Console.WriteLine(result.Success);
}

private void ExecuteSteps(UiExecutionController controller)
{
    SimpleControlsPage simpleControlsPage = controller.GetPageObject<SimpleControlsPage>();
    // Here we write the interactions executed to the application under test.
}

How to use UiPlayer?

UiPlayer supports to automate one or both technologies combined (Desktop/Web).

The default output will be: {assembly}\UiPlayerResults\{yyyy-MM-dd_HH-mm-ss}\ If the OutputPath parameter changes, the path will be the following: {OutputPath}\

You can use the UiPlayer with the NuGet Mobilize.QualityMate.UiPlayer. For more information on how to use the UiPlayer, follow this .

Singleton
Action
here
Action
link