Testing paginated UIScrollView on iPad

Posted by Piotr Czapla on Stack Overflow See other posts from Stack Overflow or by Piotr Czapla
Published on 2010-12-30T12:52:14Z Indexed on 2010/12/30 12:53 UTC
Read the original article Hit count: 200

Filed under:
|
|

I'm creating a magazine reader (something like iGizmo on iPad). I have two scrollviews one that paginate over articles and second to paginate inside of an article through pages.

I'd like to check memory usage of my app after scrolling through 20 pages. To do so I decided to create an automated ui test that scrolls 20 times right and the check the memory foot print at the end of the test.

I need that info to have some metrics before I start optimizing the memory usage

And Here is the thing: I can't make the ui automation to pass to the second page. My automation code looks like that:

var window = UIATarget.localTarget().frontMostApp().mainWindow(); 
var articleScrollView = window.scrollViews()[0]; 
articleScrollView.scrollRight(); 
// do you know any command to wait until first scrolls ends?
articleScrollView.scrollRight(); // this one doesn't work

I guess that I need to wait for the first scorlling to end before I can run another one, but I don't know how to do that as each page is just an image. (I don't have anything else on pages yet)

Any idea?

© Stack Overflow or respective owner

Related posts about ipad

Related posts about ios4