Item Property (ItemCollection Objects)

Applies to TestComplete 14.93, last modified on October 12, 2021

Description

The Item property provides access to a child item of the tested control. Note that TestComplete analyzes the type of an item and associates it with one of three available types of test objects: Item, ClickItem or CheckItem.

Declaration

TestObj.Item(Item)

Read-Only Property An Item, ClickItem or CheckItem object
TestObj A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section
Item [in]    Required    Variant    

Applies To

The property is applied to the following object:

View Mode

This property is available in the Object Browser panel and in other panels and dialogs in both Basic and Advanced view modes.

Parameters

The property has the following parameter:

Item

Specifies the desired item. This parameter can have one of the following values:

  • The item’s index within the collection. Indexes are zero-based: the first item has the index of 0, the second - 1, and so on. The index of the last item is Count-1.

  • The item’s caption or caption mask.

    To indicate variable parts of the item’s caption, you can use the asterisk (*) and question mark (?) wildcards. The asterisk corresponds to a string of any length, the question mark corresponds to any single character. The caption can be case-sensitive or case-insensitive depending on the value of the Use case-sensitive parameters project setting.

  • The path to the item, in case the desired item is a child item of the given collection. Each item in the path can be specified by its caption or index. Indexes must be enclosed in brackets - [ and ]. Individual captions and indexes in the path must be separated with pipeline characters ( | ).

    Note: If the item caption includes a bracket or a pipeline character, address the item by its index or with the question mark wildcard.

Property Value

An Item, ClickItem or CheckItem object that provides information about the specified item.

Remarks

Note that some controls may not have all item types. Thus, the Item property will return the following child objects for these controls:

  • Developer Express BarControl, Developer Express BarManager, Developer Express Ribbon (VCL), Developer Express RibbonControl, Developer Express PopupMenu, Infragistics UltraWebMenu: the Item, ClickItem or CheckItem object.

  • WPF Ribbon: the ClickItem or CheckItem object.

  • MFC RibbonBar: the ClickItem object.

See Also

Count Property (ItemCollection Objects)

Highlight search results