I\'m trying to test the presence of an UIAlertView with UIAutomation but my handler never gets called.
At the beginning of my javascript i write :
UI
e.g. - onAlert is not called
var target = UIATarget.localTarget();
target.buttons()["ShowAlert"].tap()
UIAtarget.onAlert = function onAlert(alert)
{...}
-
e.g. - onAlert is called
var target = UIATarget.localTarget();
UIAtarget.onAlert = function onAlert(alert)
{......}
target.buttons()["ShowAlert"].tap()
or
#import "onAlert.js"
var target = UIATarget.localTarget();
target.buttons()["ShowAlert"].tap()
Try it out.