Micro Focus QTP (UFT) Forums
Not able to capture the list value in a JavaList - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Others (https://www.learnqtp.com/forums/Forum-UFT-QTP-Others)
+--- Thread: Not able to capture the list value in a JavaList (/Thread-Not-able-to-capture-the-list-value-in-a-JavaList)



Not able to capture the list value in a JavaList - dileep.qa - 12-01-2010

Hi,

I am automating a JavaApplication using QTP 10.00 with Java addin. I can able to work with all the objects uisng QTP. I can able to identify the JavaList also, but here the problem i am facing is i am not able to get any list value which is showing in the application. I can get the list count of JavList object. I tried with the following codes,
var = JavaDialog("Window").JavaList("List").GetRoProperty("items count") its giving me the correct count(i checked all the properties of this Javalist, none of them have any value which is available in this JavaList).
var = JavaDialog("window").JavaList("List").GetItem("#1") or var = JavaDialog("window").JavaList("List").GetItem("1") or var = JavaDialog("window").JavaList("List").GetItem(1)...the above code is giving me some text which is not showing in the application. And even i tried with Set obj = JavaDialog("window").JavaList("List").Object
obj.GetItemAt(1).ToString (we can provide the dynamic values also in the place of 1, the item index which we need to provide for GetItemAt). Please find the attachement for the same. Could you please provide any other methods or suggestions to solve this issue asasp?
[attachment=564]

Thanks,
Dileep