I want to be able to use UIAutomation to test an app. The problem I’m running into is, I need to download allot of data from the network. Is there a way to pause a UIAutomation script until a NSNotification is posted, or do I just need to delay() longer than I think is necessary to download the data. Waiting a set amount of time isn’t preferable because sometimes data doesn’t need to be re-downlaoded.
Any help / links is greatly appreciated.
Jack’s answer works for most details, but some of the network work happens on a background queue, and there isn’t a progress indicator.
I ended up writing a helper that sticks a
CGRectZeroUIView into an element. We can then wait until this element becomes valid. It’s not as clean as I would like it to be but it’s woking.It’s not pretty but it works.