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





1. Mark Perry - 19 December 2010

Hi David – I’m getting desperate after purchasing 2 missile launchers from ‘Satzuma’ for friends/family Xmas presents and who only have imacs! I downloaded your software (several times) but been unable to unlock the unit. It looks the same as the image in your software and seems to be a ‘Nipco’ model?
All obvious checks have been made.
There is no obvious vendor nor product id.
Can you please help?

David Wilson - 19 December 2010

Hi there!

Is it the grey one with white foam darts?

With the launcher plugged in, I need you to run the terminal program (it’s in the utilities folder) and key the following

ioreg -l -w 0 > ~/Desktop/Missilelauncher.txt

Find the file called Missilelauncher.txt on your desktop and e-mail it to me.

That will at least let me know details about the launcher etc and I can tell you if it will work with this software (I hope).

Also, this launcher (my ones at least) take 4 x aa batteries. And the launcher has an on/off switch on the bottom Can you check that too please).

– David

David G. Wilson https://dgwilson.wordpress.com http://homepages.paradise.net.nz/dgwilson/

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: