How to navigate a drop-down list on a TextView in Ruby

I cannot consistently scroll through a drop-down list box that appears when I click on a TextView field.

I am testing an Android app on a physical tablet running Android 6.0, using RubyMine 2017.2.4 and Appium 1.5.3 on a MacBook Pro running OS X 10.11.6. Clicking on a TextView brings up a drop-down list of location codes. The list is not visible in Appium Inspector. I can scroll through the list 5 items at a time via

%x{adb shell input swipe #{480} #{484} #{480} #{451} 24}

in a loop, but it’s not consistent. Sometimes the list will disappear during the loop, or stop scrolling at random moments.

No keyboard shows up when I click on the TextView, just the drop-down list. Only values displayed in the drop-down list box can be entered via send_keys, so if the list box shows location codes 05, 06, 07, 08, and 09, and I do a send_keys(“15”), the TextBox will show only 05. I need to be able to scroll the list-box to where a test-value location is displayed.

Thanks in advance for your help.