Work with values of Drop-down which needs scrolling

Ranorex Spy, Recorder, and Studio.
varun
Posts: 110
Joined: Mon Jul 23, 2012 5:52 am

Work with values of Drop-down which needs scrolling

Post by varun » Mon Jan 07, 2013 8:43 am

Hi Support,

In a drop-down, multiple values are there and out of which many needs scrolling to come in visible area.
I tried using Ensure Visible and with following code snippet but unfortunately results are unexpected-

Code: Select all

function()
{
Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'CaseList.DdCityPair' at 71;7.", repo.CaseList.DdCityPairInfo);
repo.CaseList.DdCityPair.Click("71;7");
while(repo.Selectbox.BUQJNBInfo.Exists())
   {
      repo.Selectbox.Self.Click();
   }
Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'Selectbox.BUQJNB' at 35;6.", repo.Selectbox.BUQJNBInfo);
repo.Selectbox.BUQJNB.Click("35;6");
}
Please find RX snapshot of drop-down in attachments.

Thanks,
Varun.
Attachments
Drop-down_0107.rxsnp
Drop-down
(245.91 KiB) Downloaded 185 times

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: Work with values of Drop-down which needs scrolling

Post by Ciege » Mon Jan 07, 2013 4:45 pm

Have a look here for the framework method I use for selecting Combo Box items:
http://www.ranorex.com/forum/list-item- ... t4036.html

This is for DOM based Combo's but can work with any AUT with a tiny bit of tinkering...
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

varun
Posts: 110
Joined: Mon Jul 23, 2012 5:52 am

Re: Work with values of Drop-down which needs scrolling

Post by varun » Tue Jan 08, 2013 10:27 am

Ciege, thank you for the reference. It solved my problem :)

Thanks again,
Varun.