jump to navigation

UIAutomation – more help please 16 August 2010

Posted by David Wilson in iPhone.

Not my usual post here.

I have been corresponding with Michael in Denmark over getting more cameras for that region loaded into TrafficCamNZ and also trying to resolve an issue that can cause the application to crash. The crash issue was rather difficult for me to reproduce. The good news is that I managed to get there in the end, find and fix the issue. I’ll make the submission to Apple for the new version shortly. In the mean time I watched WWDC 2010 Session 306 – Automating User Interface Testing With Instruments. This was quite inspirational and I though that I should be doing some of this automated testing.

Using the video from the WWDC session and slides was enough to get me started. It also had pointers to documentation. I quickly ran into issues trying to detect objects on the iPhone screen and was unable to determine when I should use .elements() and other things like .buttons(). And then some calls returned arrays of information making it difficult to get what I wanted. During the last few days I made several posts to the developer forums at Apple with requests for information and updates on my progress. I haven’t received much feedback but it is the US holiday season and this development work did occur over a weekend.

To help out other fellow developers I thought you would appreciate a post of some references and a copy of my script, which for the moment works with one exception. The exception is where I’m trying to detect the name of an onscreen alert. if you need this, you’ll see it in my code. And when it comes times to you needing it, I’ll either know what I’ve done wrong, or if it’s a but it will be fixed!

Enjoy, and please share your experiences.

Apple Documentation

Other Web Articles




Get every new post delivered to your Inbox.

Join 73 other followers