Thanks. However, my problem is little more complex. Let me give you an example - There is a dialog box which have 2 single column tables (named available columns and selected columns). The first table contains a list of names - which can be moved to selected columns table. Now assume that the selected column table is currently empty and I move 3-4 columns from first table. When i click on the selected columns table, it throws NPE. The reason being - when the selected column table is populated, two buttons (move up and move down) are supposed to be activated (they are used to re-arrange the selected column list). Please see the attached screenshot. The basic problem is that these buttons are not getting the notification of getting enabled.
I want to emulate the manual clicking of the table so that all the events/notifications are fired correctly.
To select column, simply click on the item from Available columns list. This will enable the [>] button. Click it to move the selected item to Selected column list. Please refer to the screenshot (in earlier post).
Here is a sample code:
Dim arrayProperties, arrayValues, availableColumns, selectedColumns, leftMoveButton, rightMoveButton, closeButton, ctr, aCol
Set closeButton = Get_Object_By_Property(Aliases.JAVA_Explorer.TableColumnChooser,arrayProperties,arrayValues,25)
'Move required columns to selected columns
Note in the highlighted code - here the application throws NPE. I tried to simulate user click on the table, but again it threw NPE. The reason being, when selectAll is used via our script, the application fails to enable the MoveUp or MoveDown button (refer to screenshot)
OK, it got more clear now. It looks like you either need to use a native method of your control to fire the needed event after calling selectAll to make your control process the item selection (this mostly depends on your particular control), or select items without selectAll in the way a user would do this manually. For example, you can send a keyboard shortcut, which will select all items, to your control.