Micro Focus QTP (UFT) Forums

Full Version: How to verify list box values present in JavaTable?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
My application is in Swing. In that contains Java Table. In one column -for each cell of that column - List box is provided to select the value.

In QTP9.5 , how to verify the values in the list box?

Thanks in advance.

Dinesh
Hi,
You can get the values of a list box by using GetROProperty("all items"). All the values will be seperated by ";". Split the string and then search for the desired value in the array.
If the list box is within a table then you will have to use the childobject method to select the particular list box and then use the getroproperty(allitems) to obtain the items.
Better to look at the code.Eh ?
Hi,
Thanks Basanth and Manish for the quick reply.
I have written the code as below.
J
Code:
avaWindow("ABC").JavaInternalFrame("Master").JavaTable("Record No 1").ChildObjects.GetROProperty("all items")
Displayed following message when run the QTP code.
Object doesn't support this property or method: 'ChildObjects.GetROProperty'

Note1:
The "Record No 1 " is swing table object name.
Note2:
After Child objects when pressed . the list of property/method on ChildObjects are not displayed.
Instead displayed parameters as ([in, optional] Description)

Thanks in advance.
Dinesh
Can this also be done with a JavaList? I have a JavaList, and I need to search the list for a specific entry.. Get the items, load to array, search array?