Make scrollTo work for other UI identifiers


I am not sure if anyone has ever brought up this topic.
Currently, driver.scrollTo only works for elements that contain texts.
For example, if a button has the text “Register”, driver.scrollTo(“Register”) will work.
If that button has no texts or we want to scroll to that element by its id or xpath, scrollTo() will not work.
There might be a way to get around it in client side, but would it be better to implement it in Appium side. Have you guys ever thought about it?

I agree appium should improve on the scrolling methods. On Android, you can run arbitrary UiScrollable commands in uiautomator mode so it’s flexible. That has a bug though.

On iOS, I’ve seen similar tricks using execute script, and there’s even a mobile scroll method. The iOS simulator makes scrolling a bit difficult due to various gesture bugs.