Accuracy of Replay
At the highest level, the intention is to capture control event method executions (to determine what GUI actions were taken) and generate replay code to repeat those actions.
The general approach is to track and log all control and form event methods and application (app) methods, and generate replay code for them as it is determined that it is required. Normally, we just want to replay the RootSchema method, not reimplementations; for example:
ListBox.click(CMUI_NavigatorListBox2/21014.1); CMUI_Navigator.lstTest_click(CMUI_NavigatorListBox2/21014.1); CMUI_Navigator.lstTest_click:null ListBox.click:null
We want to replay the ListBox.click event method and not replay CMUI_Navigator.lstTest_click. As ListBox.click will call CMUI_Navigator.lstTest_click at replay time, calling them both would double up the action.
There are issues with simply replaying the event methods that are called, as follows.
-
Most of the event methods do nothing.
-
There is not a one-to-one correspondence between event methods and the original GUI actions.
-
There are GUI actions for which no events are generated.
In addition, the application can actively suppress any or all event method calls, making it difficult for the recording process to determine what GUI actions have occurred.
-
Calling an event method programmatically is not the same as performing the GUI action. For example, calling the Table class click event method does not do the following things, while clicking in the table does.
-
Set focus to the table
-
Set the selected property value
-
Change row and column property values
-
In addition, a table can behave differently, depending on whether it has focus. For example, programmatically calling the Table class click event method for a cell with the cellControl property set to table (that is, a table within a table) does not expand the cell and show the table, but clicking in the cell does.
Another example is that calling the gotFocus event method does not accomplish the same thing as calling the setFocus method, yet it is the gotFocus event method that is tracked and from which code is generated.