Applies to TestComplete 14.30, last modified on November 21, 2019
Information in this topic applies to web applications.

The Open Applications > Web Testing > Custom Attributes option specifies custom attributes of web elements that TestComplete will use as name mapping criteria if web elements cannot be uniquely identified by default predefined properties (ObjectType, id, value, etc). This approach is helpful for testing modern web applications (for instance, applications created with the React and AngularJS frameworks.). Such applications often don't use standard attributes for object identification; instead they use for this purpose custom attributes (data-test-id, etc).

To view or modify custom attributes
  1. Select Tools > Current Project Properties from the TestComplete menu.

    – or –

    Double-click the project in the Project Explorer. In the project editor that opens, select the Properties tab.

    – or –

    From the context menu of the project in the Project Explorer, select Edit > Properties.

  2. In the tree on the left of the project properties editor, select Open Applications > Web Testing > Custom Attributes.

TestComplete Project Properties - Custom Attributes

Click the image to enlarge it.

To edit the list of additional name mapping criteria

By default, the list includes two attributes: data-test-id and data-testid.

  • Add attributes:

    • Click Add From Screen and specify attributes for an object chosen on the screen via the Add Web Element Attributes dialog.

      – or –

    • Click Add and input the needed attribute name manually.

  • Delete attributes: Click Remove to delete the selected attribute.

You can temporarily disable added attributes by clearing the appropriate check boxes of attributes.

The default values for the web custom attributes option that will be used in new TestComplete projects are specified in the Default Project Properties - Custom Attributes Option dialog.

See Also

Using Custom Attributes of Web Objects
Testing Web Applications
Default Project Properties - General Web Testing Options
Project Properties

Highlight search results