AWTComponentIndex Property

Applies to TestComplete 14.40, last modified on April 22, 2021

Description

Use the AWTComponentIndex property to obtain the index of a Java application’s object. The property is only used if the object meets the following requirements:

  • The object belongs to a Java application that was created with AWT or Swing libraries.
  • The object is a descendant of the java.awt.Component class.

Objects of AWT and Swing Java applications are addressed with AWTObject and SwingObject methods. These methods can address an object by its name, or by class name, accessible name and index. The index is used if the parent object contains several child objects that have the same class and accessible names. In other words, the AWTComponentIndex property value is equal to the Index parameter of these methods.

Declaration

TestObj.AWTComponentIndex

Read-Only Property Integer
TestObj A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section

Applies To

All Java application objects.

View Mode

To view this property in the Object Browser panel and in other panels and dialogs, activate the Advanced view mode.

Property Value

The integer value that specifies the index .

Remarks

The AWTComponentIndex property is only available if the Java Application Support plugin is installed and the application under test is a Java application created with AWT or Swing libraries. Otherwise, this property is absent in the object’s property list.

See Also

Testing Java Applications - Overview
AWTComponentAccessibleName Property
AWTComponentName Property

Highlight search results