Forum Discussion

kaiiii's avatar
kaiiii
Regular Contributor
6 years ago

scroll a dropdown list

Hi,
How can i scroll a dropdown list if there are more than 200 entries.
only 6 item shown on screen ... if i need to select 7th item then i need to scroll that dropdown ... and then i can choose that item
how can i solve it

3 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    I'm not 100% familiar with the particulars of mobile testing... but I know that for desktop and web testing, for a drop-down control, if it has the "ClickItem" method, you don't need to scroll before you click... you can call the "ClickItem" to click on the particular item and TestComplete will take care of any necessary scrollign.

    • kaiiii's avatar
      kaiiii
      Regular Contributor

      Hi tristaanogre,
      also problem has been resolved by using smoothScrollToPosition() ... that helps to find item position in dropdown.
      I tried to solve it by using ClickItem but it sometimes work and sometimes not.. I don't know what is exactly problem with ClickItem 

      • slecault's avatar
        slecault
        Contributor

        I have seen cases where a list is longer than the screen and depending on how it was developped, the items are not created (added to the tree) until you they are shown on screen (via scroll)!