Forum Discussion

Iso_Yura's avatar
Iso_Yura
Contributor
2 years ago

How can I get List from Dropdown menu?

Hi folks, 

 

I'm looking for a way to get a list of names under dropdown menu in QT desktop app.

There are 88 names and I need to get all of them in order, how they are in that dropdown.

 

I can find any operations that can do that, is there any other way to get the list?

 

Thanks.

 

3 Replies

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    Are you able to see the dropdown list in Object Spy? There's usually an index in the properties somewhere that you can use to reference each item in the list.

     

    Try recording a test where you select a couple of entries in the list and then take a look at the code from that test. It may give you some clues to finding the index.

    • Iso_Yura's avatar
      Iso_Yura
      Contributor

      I can't see the full list in the Object Spy. 

      But I have "wItem[0] Params" option where I can change [0] to [1] and see first row of the list, and I have to go over all 88 rows to be able see each name. 

      This is what I have in my key word test, for a single name I have separate Property Checkpoint where I use "wItem[0], "wItem[1]", "wItem[2]",...., "wItem[87]".

       

      It's very inconvenient and time consuming in case if I have long list of name like 300 or more. 

      It will be much better to get the list and then compare actual names in list with expected as my list is continually changing.