🖋️
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
  • When to use
  • Scenario
  • How to use

Was this helpful?

  1. How to Guides
  2. Defining Controls

Control Slice

PreviousExtending ControlsNextControl Collection

Last updated 3 years ago

Was this helpful?

The Control Slice is a control that represents a slice of a or a control. We can define controls not provided to us by the DOM or Automation to perform click interactions.

When to use

  • When it is not possible to make a selector for the desired control.

  • Match with an element that is dynamic but has the same appearance.

  • The element is on the screen but is not found on the DOM or desktop controls tree.

Scenario

Images on a canvas that the DOM or Automation can't provide. The blue rectangles are the ones that the DOM or Automation recognizes, and the red circles are candidates to control slices.

Desktop

Web

How to use

  • With an image.

    [Selector("MyContainerSelector", @"MyPath\MyImage.jpg")]
    public IControlSlice MyControlSlice { get; set; }
  • With a single point.

    [Selector("MyContainerSelector", 10, 30)]
    public IControlSlice MyControlSlice { get; set; }
  • With coordinates.

    [Selector("MyContainerSelector", 10, 30, 50, 80)]
    public IControlSlice MyControlSlice { get; set; }

Usage in code

myPageObject.MyControlSlice.Click();

Currently, only the click interactions will be sent to the control slice directly. Other interactions like SendKeys will be sent to the entire control.

The Control Slice can be used through the control interface IControlSlice that can be declared in multiple ways in the .

PageObject
PageObject
Paint application with an image inside
Web canvas with an element inside