|Lesson #8: Using an automation harness / Working with the Java harness|
In this exercise, we will create a Java-scripted action that interacts with an application's user interface. We will also create a new Java class to house the new scripted function implementing the action.
In the previous exercise, you created a simple action which wrote out the value of its argument to the results. While it served as a good introduction to writing user-scripted actions, it didn't demonstrate the true utility of the harness. In this exercise, you will create a much more practical user-scripted action.
The function of action check row count, as you will define it, is to interface with a specified table in a given application window, count the number of rows for which a specified field matches a given value, and to check that count against a given expected count.
The last exercise also demonstrated how code for a new action (hello) can be added to an existing code script module. It is good practice, however, to group actions of similar functionality into their own modules, and you will observe that practice in this exercise. The action check row count operates on tables, hence you will create a new module entitled table support, effectively a place to house all of your table-related Java-coded actions. check row count will be implemented in the file Mod_Table.java , which embodies the table support module.