Micro Focus QTP (UFT) Forums
how to check data/list in dropdown 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: how to check data/list in dropdown list (/Thread-how-to-check-data-list-in-dropdown-list)



how to check data/list in dropdown list - gurram - 03-24-2008

Hi, plz help me.
I want to check content(list) in drop down list. I hav a set of data in my data sheet. so I need to check both data (in drop down list and data sheet) whether they are same or not.
thanks in advance


RE: how to check data/list in dropdown list - sreekanth chilam - 03-25-2008

Hi Gurram,

just check with the below code :
Code:
datasheet_item=trim(datatable("Dtcolname",dtGlobalSheet))
DDList_ItemCount=Window("..").winComboBox("...").GetItemCount()
   For i=0 to (DDList_ItemCount-1)
       ddlist_item=trim(Window("..").winComboBox("...").GetItem(i))
           if (datasheet_item=ddlist_item) then
                 msgbox "data is same"
                 Exit for
           end if
   Next