appium/appium — pull request #818 by mmerrell (2013-06-26 19:34:18+00:00)
Title: Implementing scroll() method for WebDriver bindings

I attempted to implement the 2-parm scroll() method from the WebDriver TouchScreen interface. The way I did it takes 2 "offset" parameters, then calculates them as startX/startY, endX/endY arguments to the existing swipe method.

I'm not 100% sure this will work, because there might be implications of starting at 0.5/0.5 in the middle of the screen--we might have to determine a better start position for the scroll. I was able to test it against my own native app, but I had a few problems, and probably need some help in getting things right:

* I could only scroll down, not up (I tried using negative numbers in the Y, but it didin't seem to matter--is it using abs() somewhere?)
* It would be nice to allow it to take floating point or integer arguments like the js API does
* Do I need to submit a unit test or app-base test to go against UICatalog? I'm glad to do it, but didn't know the standard

I hope I can learn enough from this to be able to implement things in the future without bothering you much. It was pretty frustrating, but never to the point where I considered giving up. I'd also like to contribute to documentation, like a "how-to" guide for the nuts & bolts of contributing. You guys have written about the process from a high-level, but I think we can do a lot more to help people who aren't familiar with nodeJS and the other technologies involved...

Let me know what you think and where to go from here.

Thanks!
MM