ObjectIdentifier property returns a value that uniquely identifies a web object among other objects within the same parent object.
|TestObj||A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section|
The property is applied to the following objects:
A string or integer that specifies the object’s identifier. It is determined by one of the following values:
For Image objects (
<img> elements) - the object’s
namePropStr property value which holds the last component of the src URL (typically the file name).
For Button (
<input type="button">), ResetButton (
<input type="reset">) and SubmitButton (
<input type="submit">) - the
For Area objects (
<area> elements) - the area’s
title attribute value.
For other web page elements - the object’s
name in the HTML code, changed in the following way:
If the value matches a wildcard pattern or a regular expression pattern with empty Stable ID Template, the value is ignored.
If the value matches a regular expression pattern with non-empty Stable ID Template, TestComplete creates a new identifier for the object using this template. This is used, for example, to remove dynamic parts of the identifier.
All characters other than Latin letters (A..Z a..z) and digits are replaced with underscores ( _ ).
Subsequent underscores are replaced with a single underscore.
Leading underscores are stripped.
The project’s Identification attribute setting specifies which attribute -
name - is used first.
The object’s zero-based index among the sibling objects of the same type.
|Note:||If the selected string identifier is the same as that of another object within the same parent object, TestComplete appends an underscore and index to make this identifier unique. For example, input, input_1, input_2 and so on.|
This property is available only if the Tree model of web objects is active.