While writing Selenium automation test for a website having number of rows in the form of DIV inside one DIV. every row denotes one DIV. suppose dynamically if I have 5 rows then following code structure is there.
<div id="mainDiv">
<div id-"div1"><table>......</table></div>
<div id-"div2"><table>......</table></div>
<div id-"div3"><table>......</table></div>
<div id-"div4"><table>......</table></div>
<div id-"div5"><table>......</table></div>
</div>
I am fetching each row div/table/tr/td using XPath in for loop in my code and clicking on each. So that I can download pdf. But it is working fine for 19 DIV. for 20th DIV I am not able to find that in my page using XPATH. I am getting no such element exception. though I applied wait then I get that explicit condition failed issue. Can anyone having idea that its a scroll issue or anything else because of which I am not able to fine 20th and further more divs.