开发者

How to control the app flow with UIAutomatoin's javascript(iOS)?

Recently, I need to do some stress test on my iOS app. I found unit-test is only for some code level or small module level test.(Maybe I'm wrong, but this is what I understand it by now)

So I think if I need to do some app level stress test with the whole app running, I can use instruments's UIAutomation.

Apple hasn't provide much document about how to use it. I searched the web and 开发者_Python百科has learned some basic ways to use UIAutomation. But how to use it in some more complex way?

I only found that UIAElement has a waitForInvalid method can do some control work.But how can I do something like "waitUntilItAppearsOnScreen"?

Do I have to use something like

while(true)
{
   if(something.isOnScreen())
   {break;}
}

?

(I know that might not be javascipt code, just for explaination)


try using the these methods

isVisible isEnabled isValid checkIsValid

Personally I like to use isVisbile(). That seems to give me more success.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜