TestComplete has the Java Control Support plugin that expands TestComplete abilities to interact with Java controls from scripts. If the plugin is installed and enabled, TestComplete extends the JTable functionality with methods, properties and actions of the JTable
object. These supplementary members let you perform specific operations over JTable, for example, simulate clicks on grid cells, obtain and set values in grid cells, expand and collapse rows, and so on.
Since JTable is a Java control and can be used in Java applications, which are always “open” to TestComplete, internal methods and properties of the JTable object are also visible to TestComplete. This “openness” means that you can use JTable’s “native” methods and properties to perform needed actions as well.
Finally, you can work with JTable as with a black-box application window, that is, you can simulate various mouse actions and keystrokes, record and play back low-level procedures, and so on. For more information, see Simulating User Actions.
In order for TestComplete to have access to internal methods and properties of the JTable object and to extend the JTable functionality, both the Java Application Support and Java Control Support plugins must be installed and enabled. |
The topics of this section contain information about operations commonly performed when testing applications containing Java Swing JTable. They also contain numerous sample routines which can be used in your scripts with minimum changes. The sample scripts in these topics work with the SimpleTableDemo sample application that is available at http://java.sun.com/docs/books/tutorial/uiswing/components/table.html.
In This Section
Searching for Records in Java Swing JTable
Selecting Cells in Java Swing JTable
Activating and Closing In-place Editors in Java Swing JTable
Obtaining and Setting Cell Values in Java Swing JTable
Copying and Pasting Cell Values in Java Swing JTable
Sorting Data in Java Swing JTable
Iterating Through Rows in Java Swing JTable
See Also
Working With Grids
Supported Java Controls
Testing Java Applications - Overview