Appium 1.6.3 using Ruby as the language to write tests for Android devices
The scroll_to method is not meeting our needs. I can get a test to work on some devices but not others. There are many issues around this call.
First you can't have a spinner or other control that supports scroll_to in focus before you make the call otherwise it will scroll that widget instead of the screen. To get around that I have to click on a text field first but that brings up the keyboard. On some emulated devices the scroll will occur with the keyboard is visible - the Nexus 6P works fine, a Nexus 5 will not.
If I hide the keyboard after I click on the text control the focus returns to the top most control on the screen which happens to be a spinner which causes the scroll_to to break again as it scrolls the spinner and not the screen.
If I had a way to set focus to a control without the click we might be able to get around this issue. We also have the issue if all controls are spinners or other scroll based widgets on a screen I have no way to scroll because any control I set focus to will take over the scrolling and I can't get to the screen scroll.
Next the scrolling only takes the text of control. I have a lot of controls that don't have text or content descriptions. They are switches or spinners. For the spinner the data is loaded for the logged in user from the server. I have zero way of knowing at the time the test is run what that data will happen be be. I can not provide "text" to the work around scroll methods I have seen in other posts on this site.
We don't have labels in front of our spinners so we can't scroll to a label. We do have labels above groups of spinners but scrolling to that label does not guarantee the spinner below it will come into view. Since Appium depends on the control you want to access being in view and not just in the overall XML hierarchy this also causes many issues.
We need the ability to scroll to an item based on ID because there are times there is no way to have associated text.
There are so many limitation to the scroll_to that is has been impossible to write tests for our current displays. I hope there are some other quick work arounds so we can actually write tests that work on multiple devices.