0

I want to find a element in the list but I am in middle of the list so I have do both scroll up and down to find the element in the list. Can Anyone help how to do both scroll up and down to find the element in the list

Thanks in advance
Karthick

alannichols
  • 1,496
  • 1
  • 10
  • 20
Karthick
  • 21
  • 1
  • 4
  • Can you please provide some more details - is this a pickerView? I can think of some logical ways to scroll up and down but without more knowledge about what you're interacting with I can't be sure my answer will be applicable. – adam reed Mar 26 '15 at 14:51

1 Answers1

0

If there's no logical way to decide if it is going to be higher or lower, you could do both:

begin
  #scroll up, look and click
rescue
  #scroll down, look and click
  #this will be skipped if the above code finds the element
end
adam reed
  • 2,024
  • 18
  • 24