Add Dynamic Identifier Pattern Wizard - Create Web Object's Dynamic Identifier Pattern Page

Applies to TestComplete 15.63, last modified on April 23, 2024

The Add Dynamic Identifier Pattern wizard helps you create patterns for handling dynamic object identifiers in web and hybrid mobile applications.

On this page, you can review the match pattern generated by TestComplete for the specified dynamic identifier and correct it if necessary. You can also see the stable identifier extracted from the dynamic identifier if any.

The Initial identifier text box displays a web object’s identifier, whether defined in the object’s HTML code or entered by you on the previous page of the wizard. The Resulting identifier is the stable identifier extracted from the Initial identifier according to the match pattern. This is the combined value of all captured submatches that have Keep It checked. You can modify this identifier by selecting and unselecting the Keep It check box for pattern items in the table.

A pattern is represented in a table as a sequence of predefined subpatterns and user-defined items. The table includes the following columns:

  • Group Type - the item type:

    • Any symbol except for ":", "_" and '-" - Matches an arbitrary string consisting of letters, digits and other characters except for colon ( : ), underscore ( _ ) and hyphen ( - ). For example, it matches treepicker and treepicker123 but not tree_picker.

    • Any symbol except for digits, ":", "_" and '-" - Matches an arbitrary string consisting of letters, digits and other characters except for colon ( : ), underscore ( _ ) and hyphen ( - ). For example, it matches treepicker but not treepicker123 or tree_picker.

    • Number - Matches a non-negative integer number (that is, a sequence of digits). For example, it matches 1234 in id1234.

    • Specific string - Literally matches the string specified in the Value column (exactly as it appears).

    You can select the subpattern type from the drop-down list.

  • Value - For Specific string subpatterns, you use the Value column to enter the exact string to match. For example, given the dijit_Dialog_0 identifier you can enter dijit_ to match the identifier’s prefix.

    For other subpattern types, Value displays the matching value captured from the identifier. This value is read-only.

  • Keep It - Select this check box if the captured Value is non-dynamic and you want to include it in the stable Resulting identifier. Otherwise leave the check box unchecked.

    If Keep It is not checked for any pattern subitems, Resulting identifier is empty and TestComplete considers all web object identifiers that match the specified pattern completely dynamic. It will ignore these dynamic identifiers and use other identifiers for the web objects instead (for example, name or index).

To add a new item to the pattern

Click Add and select the item type from the Group Type column. For Specific string items, enter the exact string to match in the Value column.

To remove an item from the pattern

Select the item in the table and click Remove.

To change the item order in the pattern

Use the Move Up and Move Down buttons.

Once you are satisfied with the pattern, click Next to proceed.

See Also

Add Dynamic Identifier Pattern Wizard
Web and RIA Testing
Handling Dynamic Identifiers in Cross-Platform Web Tests
Handling Dynamic Identifiers in Classic Web Tests
Handling Dynamic Identifiers in Hybrid Mobile Applications (Legacy)
Project Properties - Object Identification Options

Highlight search results