Working With Android List View Controls - Basic Concepts

Applies to TestComplete 15.40, last modified on March 25, 2022
General Notes

With TestComplete, you can simulate actions over list view controls in Android applications. List view controls are associated with the Android ListView objects, and TestComplete uses various methods provided by these objects (such as TouchItem, LongTouchItem and other). The list view Android object’s properties allow you to retrieve data from the list view and check an item’s properties. For instance, the wSelected property returns True if the specified item is selected, and so on. For more information on available actions, see the object description and Working With Android List View Controls.

In addition to standard list view controls, TestComplete supports expandable list views and works with them via the Android ExpandableList object. For detailed information, see Working With Android Expandable List Controls

Specifics of Working with ListView Controls

Currently, TestComplete does not support recording tests for Android Open Applications. In order to use extended support for list view controls, you need to create tests manually. For detailed information, see About Testing Android Applications (Legacy) and Creating Tests for Android Open Applications (Legacy).

During playback, the list view Android objects use the following principles for simulating user actions:

  • In properties and methods of the list view objects, you can specify the desired list view item using its index or caption. When specifying item caption, you can use wildcard characters (* and ?) or regular expressions. The wildcard asterisk (*) corresponds to a string of any length (including an empty string), the wildcard question mark corresponds to any single character (including none). To specify more complicated parts of a caption, use regular expressions.

    In addition, TestComplete can treat the item captions as case-sensitive or case-insensitive depending on the Use case-sensitive parameters project setting (you can change it on the Properties page of your project’s editor). For more information, see Addressing List View Items.

  • If the target list view item is out of the device’s screen bound, it cannot be displayed in the Object Browser panel. As a result, you cannot perform a touch on the item. To do this, you should use internal methods of the list view object (TouchItem, LongTouchItem and so on). In this case, the control is automatically scrolled to the specified item and simulates the desired action.

See Also

Working With Android List View Controls
Object-Specific Tasks
Android ListView Support
Android ExpandableList Support
Simulating User Actions Over Android Devices (Legacy)
Supported Controls

Highlight search results