We have a drop down list written using div tags. Selenium fails to identify the elements which are not in the display and throws an error.Using JS code to scroll - .scrollBy(0,y) option wouldn't work here.
The drop-down list is not written using the select tag. It is more like a list. The list is first displayed as a picker button. When it is clicked it displays a list which can be scrolled. The list is written using div tags.
<div id="xxx_pickerMenuItem1" type = "button">
<div id = "xxx_pickerMenuItem1_text">Text1</div>
<div>
<div id="xxx_pickerMenuItem2" type = "button">
<div id = "xxx_pickerMenuItem2_text">Text2</div>
<div>
.
.
.
.
Is there a way to scroll the list down and check whether the element required is displayed or not?