Forum Discussion

grace_ca's avatar
grace_ca
Occasional Contributor
4 years ago

check an item exists in the dropdown list

Our application has a combobox that has a list of items. 

The applicate works like this: If the item has already added it won't show in the dropdown list.

I need to check if the item exists before clicking. 

 How to do that?  The only useful attribute for the combobox is childElementCount.

 

Thanks!

  • I think I found solution by using the itemcount to loop through and check the combobox object's "options" tag. 

     

     

  • grace_ca's avatar
    grace_ca
    Occasional Contributor

    I think I found solution by using the itemcount to loop through and check the combobox object's "options" tag. 

     

     

    • tphillips's avatar
      tphillips
      Frequent Contributor

      That's what we usually do, get the itemcount and get each item in a for loop.