Hi all,
I’m trying to automate an iOS app. On a screen, it has a scrollable element, for example, Google map.
How can I scroll the page outside of the map? To scroll the page itself, not the map?
Down the screen, there are other elements and I want to scroll down until one of them is visible, but that element is not plotted to page source until the page scrolls down, so I can not scroll to an element.
So, ultimately, I just need to scroll the screen with a map until some element is visible.
I don’t know in which language you code but you can try something like:
TouchActions action = new TouchActions(driver);
action.scroll(element, 10, 100);
action.perform();
Thanks everyone.
The solution I found is … there is no solution. All of the above suggestions (and many others I have tried) will just scroll the map.
The only viable option is to touch/press some ‘not scrollable’ point on the page and move it.
Hi Serge,
I appreciate your response, but what will do if we have elements listed in this manner that each element is highlighting and if tries to inspect Scroll provided, then not able to inspect scroll
Confused now. Are we talking slow scrolling, or are we talking “swipe”, swipe is totally different to the suggested scrolling technique. In my app I recently used dragFromToForDuration() I had to specify a duration > 2000 ms for it to work reliably. I assume this is what you also tried Serge?
When you do this as a human, are you dragging, or swiping?