Micro Focus QTP (UFT) Forums
Facing Issue with "GetItem" method of 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Facing Issue with "GetItem" method of JavaList (/Thread-Facing-Issue-with-GetItem-method-of-JavaList)



Facing Issue with "GetItem" method of JavaList - Nasir Ahmed - 10-31-2014

Hi,

We are facing the problem in getting the Item from JavaList using "GetItem" method. However QTP is able to identify the JavaList object and performing the "Select" Operation Successfully.


Code Snippet :
Code:
strVal=JavaWindow("").JavaList("e").GetItem("#1")
Error message: Operation can’t be performed.

Code Snippet :
Code:
Set objJavalist =JavaWindow("Clearance Desktop - Nasir").JavaList("Telephone").object
intCount=objJavalist.getItemCount()
msgbox  intCount
For i=1 to intCount-1
msgbox objJavalist.getItemAt(i).toString
Next
Error message: Object doesn’t support this property or method objJavalist.getItemCount()

Object properties : "toolkit class:=org\.eclipse\.swt\.custom\.CCombo"

Thanks,
Nasir