| || |
identifying highlighted cell color on Java front end
can anyone tell me if it is possible to identify which cell is highlighted in a table (grid) on a Java screen (not applet). The application I am testing has a dynamic search where in as you enter the characters in the search field the cursor moves to the matching row dynamically and the row will be highlighted in blue.
Re: identifying highlighted cell color on Java front end
I have also dealt with this issue. Here is a sample of what I did...
Set jTableObj = JavaWindow("Window Name").JavaTable("Table Name").Object
'This sets jTableObj to the actual run-time object so you can call the run time methods out of the Java object itself.
Next, in Object Spy, get the runtime object properties and methods for the selected table. Do this by clicking the pointing hand button at the top of the Obj. Spy dialog then clicking on the table you want. On Obj. Spy, select the runtime object radio button and then the methods tab. Find the appropriate method to get the row, such as "getSelectedRow" or "getCurrentRow" or whatever it may be, then in you script, call that method like so:
CurrentRow = jTableObj.getSelectedRow()
CurrentRow = jTableObj.getCurrentRow()
You can also find and call other internal methods to any other object in the same way.
Hope that helps.