Creating a Java Object in QTP
QTP - 9.5 + java add-in
Test Application - Java applet with custom controls.
In my application there is a custom GridTable component where QTP is identifying it as a whole java object. Now i'm able to set and get the value of the particular cell using the JavaObject("GridTable").object.getcellvalue(1,1). This way i'm able to access all the methods which are displayed in the list. But this inline help popup/displays only public methods which are kept open by the developers.
There are also public methods to get the background color, foreground color etc.. but using those i'll be only able to get the back ground color of the GRID TABLE and not the particular cell by coding for e.g. JavaObject("GridTable").object.background()
Now what i want to do is to fetch the background or foreground color of the particular cell but it is not possible with the above code as i can't pass the row number, column number of the cell.
So is it possible to create java object of the particular cell where as in i can use those background(), foreground() method
for. JavaObject("GridTable").object.cell(1,1).backgroun d()
When i tried the above code, it displays this method is not acceptable.
So please tell me how shall i create the object of particular cell so that i can use the methods mentioned above..
I wanted to do something like this
Set Jobject = B().P().F().JavaObject("GridTable").object.cell(1, 1)
and then use Jobject.background() so that i will get the background color of the defined cell.
Also is it possible to access the private methods of the custom control?
Any help is highly appericated