verifyTextPresent in a div with lot of elements

I have a **div **with a lot of elements. I can scroll to the bottom and see the elements.
But when I use verifyTextPresent the test only passes if i use the elements which are visible.
The test fails if i look for the last elements that i can see by scrolling to the bottom.
How do I get about if I want to verify if the last element is present.

You can do the following -

  1. Store the values in ArrayList
  2. Then verify the data.

This should work.

You can try to scroll to the bottom using keyword