Interacting with the user interface Elements of an application is a common requirement for automating a process and being able to successfully and consistently identify those Elements is of one the most critical aspects of an automation effort. Since there is not one solution to any problem, AutoBloks provides several techniques for Element Identification.
Element Identification is defined on the Identification tab of the Instructions pane for an Activity Call and is comprised of the following parts:
- (1) Element Nickname
- An optional nickname to assign to your Element. This value will be used in place of complex identifiers and is more user-friendly to read and understand.
- (2) Identification Technique
- There are multiple ways to find an Element, and this selection allows you to choose the technique best-suited for your situations.
- (3) Identification Technique Details
- This area of the user-interface changes based on your selection for Identification Technique. See below for a discussion of the different views presented here.
- (4) Multiple Match Policy
- Sometimes the information provided to match an Element will match more than one Element, and this policy is used determine what happens in that scenario.
The following sections define different Identification Techniques available for locating the desired user-interface Element.
The following configuration is displayed when Simple is selected for the Identification Technique:
The Simple identification technique provides the most straight-forward way to locate an Element. The methods available to use with this technique vary by the Element, so refer to the following for details on individual element types:
Property Conditions Identification
The following configuration is displayed when Property Conditions is selected for the Identification Technique:
Every Element you can interact with has a set of properties. These properties include information such as location on the screen or the text value. Using the Property Conditions technique, you can define one or more properties which can be used to identify your Element. Each condition you list must be met to match on that Element.
When defining a condition, you specify the Property Name, the Condition that must be met by that property, and the Comparison Value to which the value of the property will be compared. You can also specify if the comparison is Case Sensitive.
The following conditions are available:
|Equals||The value of the property must fully match the comparison value. A property with a value of |
|Does Not Equal||The value of the property must not fully match the comparison value. A property with a value of |
|Contains||The comparison value must be fully represented somewhere in the property value and could also match the entire value. A property with a value of |
|Does Not Contain||No part of the value of the property can contain the entire comparison value. A property with a value of |
|Begins With||The value of the property must begin with the comparison value and could also match the entire value. A property with a value of |
|Does Not Begin With||The value of the property must not begin with the comparison value or fully match the entire value. A property with a value of |
|Ends With||The value of the property must end with the comparison value and could also match the entire value. A property with a value of |
|Does Not End With||The value of the property must not end with the comparison value or fully match the entire value. A property with a value of |
|Matches||The value of the property must match a given regular expression pattern. The pattern must match the entire property value. Regular expressions are powerful pattern definitions that can be used to match a wide variety of values. For more details on regular expressions, there are many resources available on the web, including this helpful site.|
|Does Not Match||The value of the property must not match a given regular expression pattern.|
The available properties vary by Element, so refer to the following for details on properties for individual element types:
Element-Specific Identification Techniques
Some Elements will have identification techniques unique to their element type. Refer to the following for element-specific identification techniques based on element type:
Multiple Match Policy
For almost any Element Identification technique, there is the possibility that the information provided will match more than one Element on the screen. When this happens, the Multiple Match Policy is used to determine which Element, if any, to use.
|Use first match||This is the default setting and instructs AutoBloks to use the first Element it finds. This option also improves playback performance since AutoBloks can stop looking for Elements after it finds the first match.|
|Match item at position||This option will match the Element based on either Discovery position or Screen position. Discovery position (search order) is faster than Screen position, but Elements are not always searched in the order they appear on screen. If the location on screen is important, use Screen position and the exact screen location of each Element will be used to determine location. The Screen position search is the slowest since it not only has to find all the matching Elements, it must also calculate their location to sort them properly. Elements are sorted starting at the upper-left corner of the screen and then moving left-to-right, top-to-bottom. The first Element will be at position 1.|
|Match must be unique||This option instructs AutoBloks to issue an error message if more than one match is found. Unlike the Use first match option, this option will continue searching for matches even after the first match is found. This can reduce playback performance but will make sure an error is thrown if more than one object matches the Identification Technique.|