When I use for loop, which calls UIATarget.localTarget().frontMostApp().mainWindow().elements(); to search a specific element on the Main View, it runs really slow. Has anyone experienced this problem yet? If so, any sug
I ran into the same problem and after some research, I found out that UI Automation waits if a call to myElement.elements()[i]
in case the element is not yet accessible. So if you want to decrease this delay you should push a new timeout value on the stack and then pop it like that:
UIATarget.localTarget().pushTimeout(0);
...
UIATarget.localTarget().popTimeout();
or simply:
UIATarget.localTarget().setTimeout(0);
Source: http://developer.apple.com/library/ios/#documentation/ToolsLanguages/Reference/UIATargetClassReference/UIATargetClass/UIATargetClass.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With