Unable to recognize child objects of Java SWT Application
Hi,
I am using testcomplete tool for dsktop application. GUI of the application is built in JAVA (SWT).
I am facing an issue that 'Child objects of application are not able to recognize using Object spy'
This issue is for few scenarios for Ex:When application is having values in Grid format.
When I use 'Object Spy' on this grid, shows Childcount as '0' however there are values in the grid in form of row,column.
If I record the script using (Jscript) values get detcted in form of 'pixel' click.
I am not able to recognize these values in form of there names.
Can anybody suggest solution.
I had gone through help topics as 'Testing Java Applications'but could not solve the probelm
Testing Details:
Java version:1.7.45
TestComplete Tool version: 10.3
Launched TestComplete tool as 'Run as Administrator'
Checked that below Plugins are installed.
- Java Application Support.
- Open Applications;
- Desktop Applications Testing.
It seems to be a Nebula Grid control. If so, you can get data from this grid and interact with it using the grid's internal methods and properties - those under the Java category in the Object Browser.
For example, to get the grid data:// JScript var grid = ...; // "path" to your grid object var nRows = grid.getItemCount(); var nCols = grid.getColumnCount(); var value; for (var i = 0; i < nRows; i++) { Log.Message("Row " + i); for (var j = 0; j < nCols; j++) { value = grid.getItem(i).getText_2(j).OleValue; Log.Message(value); } }
To expand or collapse a row:
gridObj.getItem(index).setExpanded(true); gridObj.getItem(index).setExpanded(false);