Supported Java Controls

Applies to TestComplete 14.0, last modified on January 23, 2019

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

About Supported Java Controls

TestComplete can work with any Java control via a graphical user interface. Besides, TestComplete provides extended support for most of Java controls. It automatically associates them with special scripting test objects that contain supplementary methods and properties for working with the controls, for example, for selecting individual items and retrieving the item text.

Requirements

  • A license for TestComplete Desktop module.

  • The Java Control Support plugin. It provides access to controls via special program objects. It also enables creating table checkpoints for controls that display data in a tabular form. For the full list of these controls, see About Tables Collection.

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.

Supported Component Versions

Java ver. 5 - 10.

Supported Classes

Below is the full list of the Java 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
Button javax.swing.JButton
Check box javax.swing.JCheckBox
Combo box javax.swing.JComboBox
List javax.swing.JList
Main menu  
Menu bar javax.swing.JMenuBar
Password field      javax.swing.JPasswordField
Radio button javax.swing.JRadioButton
Scroll bar javax.swing.JScrollBar
javax.swing.JScrollPane$ScrollBar     
Scroll pane javax.swing.JScrollPane
Slider javax.swing.JSlider
Spinner javax.swing.JSpinner
Tabbed pane javax.swing.JTabbedPane
Table javax.swing.JTable
Text area javax.swing.JTextArea
javax.swing.JTextPane
javax.swing.JEditorPane
Text field javax.swing.JTextField
javax.swing.JFormattedTextField
Toggle button javax.swing.JToggleButton
Tool bar javax.swing.JToolBar
Tree javax.swing.JTree

Recognizing Custom Controls

To command TestComplete to recognize your custom Java controls, open your project’s Object Mapping options and add the control’s class name to the corresponding subgroup of the Swing Controls 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 Java 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

Highlight search results