Is there a way to set the location of your screen? (iOS and real device)

I am using node.js

If there is a way to swipe to a certain element that would be best! I currently have a page that just displays a long list of 50+ items. A couple key things to note: the list is always random and saves the position you have scrolled to. I am given a list of 10 of those items and I would like to iterate over the list and click on the desired item.

So far I have tried getting the elements location(x,y) and using an if statement to scroll down if the y-axis is not on the screen. While this works for the first element the second element might be above not below the first and to compound that problem if the item was “two” swipes down it wouldn’t swipe twice. I hadn’t wrote a long if elseif elseif else statement depending on the y-axis location of the desired device. And the list view begins from where we left off (saves your spot) meaning the next desired item could be item #1 but i could be way down the list.

If anyone has an idea I would greatly appreciate any pointers. This is my first time writing here so please forgive me if I left out an important detail or my formatting isn’t up to par. Thanks again!