Supported Android Controls

Applies to TestComplete 15.70, last modified on December 17, 2024

TestComplete supports testing of various Android controls. You can also modify project properties so that TestComplete recognizes your custom Android controls. The sections below describe how you can test Android controls in detail.

About Supported Android Controls

TestComplete can work with any Android controls via a graphical user interface. It checks a control’s class name and automatically associates it with the appropriate scripting object.

For recognized Android controls, TestComplete provides a number of standard methods and properties that it provides for onscreen objects. Besides, TestComplete provides extended support for the most popular Android controls (see below). It provides a number of supplementary methods and properties that help you simulate various actions on the controls, for example, select individual items in a list or get a control’s text.

Also, TestComplete provides access to “native” methods and fields. You can use them to perform specific actions or retrieve data from a control, if other testing means are not enough.

Requirements

  • A license for TestComplete Mobile module.

  • The Android Support plugin.

    This plugin is installed and enabled automatically. If you experience issues when working with the controls, select File | Install Extensions from the TestComplete main menu to check whether the plugin is active. If the plugin is not available, run the TestComplete installation in the Repair mode.

  • Both the Android device and your Android application must be prepared for testing (the application must be compiled as an Open Application). For complete information, see Preparing for Testing Android Applications (Legacy).

Supported Controls

Below is the full list of the Android controls for which TestComplete provides extended support.

Note that TestComplete provides support for the listed controls as well as for their descendants. However, to make this possible, you need to specify the class name of your inherited control in the corresponding group of the project’s Object Mapping options. For more information, see Object Mapping.

Controls Classes
Action bar com.android.internal.widget.ActionBarView
Bar android.support.v7.widget.ActionMenuView
android.widget.ActionMenuView
com.android.internal.view.menu.ActionMenuView
TestComplete versions prior to version 12.40 used the Layout name for controls of the com.android.internal.view.menu.ActionMenuView and android.widget.ActionMenuView classes. Since version 12.40, TestComplete uses the Bar name for these classes. To avoid errors, you need to modify the tests created in TestComplete 12.31 and earlier.

Possible Workarounds

Button android.widget.Button
android.widget.ZoomButton
Calendar android.widget.CalendarView
android.widget.DatePicker
Check box android.support.v7.widget.AppCompatCheckBox
android.widget.CheckBox
android.widget.Switch
android.widget.ToggleButton
Clock android.widget.AnalogClock
android.widget.DigitalClock
android.widget.TextClock
Edit text android.inputmethodservice.ExtractEditText
android.support.v7.widget.AppCompatEditText
android.widget.AutoCompleteTextView
android.widget.EditText
android.widget.MultiAutoCompleteTextView
android.widget.SearchView$SearchAutoComplete
Expandable list android.widget.ExpandableListView
Grid view android.widget.GridView
List view android.widget.ListPopupWindow$DropDownListView
android.widget.ListView
com.android.internal.app.AlertController$RecycleListView
Number picker android.widget.NumberPicker
Radio button android.widget.RadioButton
Radio group android.widget.RadioGroup
Scroll view android.widget.HorizontalScrollView
android.widget.ScrollView
Search view android.widget.SearchView
Seek bar android.support.v7.widget.AppCompatSeekBar
android.widget.RatingBar
android.widget.SeekBar
Spinner android.widget.Spinner
android.support.v7.widget.AppCompatSpinner
Tab host android.support.design.widget.TabLayout
android.widget.TabHost
Time picker android.widget.TimePicker
Toolbar android.support.v7.widget.Toolbar
android.widget.Toolbar
Web view android.webkit.WebView
Zoom controls android.widget.ZoomControls

Recognizing Custom Controls

To command TestComplete to recognize your custom Android controls, open your project’s Object Mapping options and add the control’s class name to the corresponding subgroup of the Android group. The subgroup name corresponds to your custom control’s type. Once the control is mapped, it gets all the properties, methods and actions specific to the Android control of the corresponding type.

If the specified custom control does not fit the control’s type, then it may not properly respond to commands that TestComplete sends, so recording or playing back user actions over the tested control will cause errors.

See Also

Supported Controls
Testing Android Applications (Legacy)
Testing Android Open Applications (Legacy)

Highlight search results