Micro Focus QTP (UFT) Forums
Issue related to dropdown selection(Please help urgent) - 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 Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Issue related to dropdown selection(Please help urgent) (/Thread-Issue-related-to-dropdown-selection-Please-help-urgent)



Issue related to dropdown selection(Please help urgent) - excellentpawan123 - 05-27-2014

Hi
I am facing a problem i.e. i am unable to select item in dropdown box. Earliar it was working fine but due to some refactoring, static text control is used. As i run script it gives message as "Object disabled"


Code:
count1 = Dialog("text:=XYZ").WinComboBox("attached text:=Primary Property","nativeclass:=ComboBox").GetROProperty("Items count")

print count1

For i =0 to count1-2
Dialog("text:=XYZ").static("nativeclass:=Static","window id:=2212").WinComboBox("attached text:=Primary Property","nativeclass:=ComboBox").Select i

Next


I wonder that it is giving correct count but on selection it fails. Please help........

image of object spy is attached

Thanks in advance


RE: Issue related to dropdown selection(Please help urgent) - Tarik Sheth - 05-30-2014

Hi,

Please try this, getting the Ubound of items count and then selecting it.

https://www.learnqtp.com/forums/Thread-Selecting-values-from-drop-down-using-QTP


RE: Issue related to dropdown selection(Please help urgent) - excellentpawan123 - 05-31-2014

Hi basanth i think both are same codes. Problem is that qtp does not identify object