Forum Discussion

nramesh's avatar
nramesh
Occasional Contributor
10 years ago

Selecting a specfic element from a drop down list menu



My application has a drop down menu with a list of names. However the names in the list are dynamic and tend to change.



Is there is a way to organize my script such that i can ask TestComplete to always select the first option in the drop down list irrespective of the name given? How would you write that on the script?


Call cell.select140_Name.ClickItem("Peyton Manning 38M")



Thank you very much!


1 Reply

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)
    Hi Navaneeth,

     


    You can try the following:




    Call cell.select140_Name.ClickItem("Peyton Manning*")




     


    or 


     




    Call cell.select140_Name.ClickItem("[0]")