🖋️
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
  • Inspect Tool - Developer Tools
  • Before this guide
  • Open the Inspect
  • Finding my Element
  • Element Information
  • Creating Selector
  • Code Example

Was this helpful?

  1. Basic Concepts
  2. Selectors
  3. Identifying Selector

Identify for Web

This is a short guide that will show you how to find selectors for web applications.

PreviousIdentify for Windows DesktopNextSetting Up the Configuration

Last updated 3 years ago

Was this helpful?

Inspect Tool - Developer Tools

To identify selectors on our supported web browsers we will use the browser Developer Tools. From here we will refer the Developer Tools as Inspect.

Before this guide

This guide assumes that you will use our asset application, but the process is the same for any web application.

The images used on this guide were using the Firefox browser.

Open the Inspect

Here are the links to open the inspect for each browser:

  • Internet Explorer, press F12 key.

Finding my Element

Once the browser starts go to your application on the web or enter the local path. Once you open the Inspect it will show like this:

Element Information

You have to look for the selector of the container of our control and take note of its tag and attributes. This is the information that QualityMate will use to find the element.

Creating Selector

You will primarily focus on these 3 properties when creating a selector for web applications:

  • Tag

  • Id attribute

  • Class attribute

Code Example

An example to bind elements with the common selectors using our application would be like the following:

using Mobilize.QualityMate.Automation.Entities;
using Mobilize.QualityMate.Automation.Selectors;
using Mobilize.QualityMate.ControlInterfaces;

[Selector("#Form1")] 
public class MyApplication : PageObject
{
    [Selector("button")]
    public IButton MyButton { get; set; }
    
    // ...
}

Some browsers have a function to create the CSS Selector, you could search how to use it.

The Inspect will show the DOM of you tested application. You can search the elements through the , but this can be not very easy in most cases. An easier way to locate a component is by right-clicking it and then using the Inspect option. This action will focus on and highlight the selected component in the Inspect.

DOM
Chrome
Firefox
Edge
920B
WebAssets.zip
archive
Web Application
Firefox Inspect on Web application
Selected component focus on and highlight in Inspect
Tags and Attributes