title: Handling Alert with UIAutomation
body: <p>I'm trying to test the presence of an UIAlertView with UIAutomation but my handler never gets called.</p>
  
  <p>At the beginning of my javascript i write :</p>
  
  <pre><code>UIATarget.onAlert = function onAlert(alert) {
      UIALogger.logMessage("alertShown");
      return false;
  }
  </code></pre>
  
  <p>As i understand it, as soon as i specify my onAlert function, it should get called when an alertView appears during my tests.
  So i run a test that shows an alertView, here is the code that shows the alert :</p>
  
  <pre><code>UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:message message:nil delegate:self cancelButtonTitle:nil otherButtonTitles:@"OK", nil];
  alertView.accessibilityLabel = @"alerte d'avertissement";
  [alertView show];
  </code></pre>
  
  <p>I run my test in instruments, the alert shows up but my handler is never called. Has anybody been able to use event handlers with UIAutomation ?</p>
  
  <p>Thanks,
  Vincent.</p>