Micro Focus QTP (UFT) Forums
select an item from a very long drop down list - 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: select an item from a very long drop down list (/Thread-select-an-item-from-a-very-long-drop-down-list)



select an item from a very long drop down list - vijayendra.shukla - 12-03-2013

Hi,

Even though i am able to do it with my looping logic, i just wanted to see if anyone else has a better solution to my problemSmile.

I have a drop down that contains over 100 items. I have to select the drop down value based upon the user input but the user input is not the complete name as it appears on the drop down. User input is a keyword that appears in the drop down value. E.g. if the drop down value is "12345 - ABC 0001245 - Testing drop down" then user input is 12345 because first 5/6 digits are unique.

Now as per my solution, I am looping through all of them and doing Instr to see if this is the drop down i want. But it is very time consuming as if the values that i want are the last values in the drop down. Anyone has a better solution? I would really appreciate your time and input! TIA!!!