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:
Firefox Inspect on Web application
The Inspect will show the DOM of you tested application. You can search the elements through the DOM, 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.
Selected component focus on and highlight in Inspect
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.
Tags and Attributes
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:
Some browsers have a function to create the CSS Selector, you could search how to use it.
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; }
// ...
}